https://github.com/fixrb/fix-let
Fix extension gem to define memoized helper methods.
https://github.com/fixrb/fix-let
ruby
Last synced: over 1 year ago
JSON representation
Fix extension gem to define memoized helper methods.
- Host: GitHub
- URL: https://github.com/fixrb/fix-let
- Owner: fixrb
- License: mit
- Created: 2015-11-27T22:24:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T16:52:37.000Z (over 2 years ago)
- Last Synced: 2025-01-20T16:42:38.444Z (over 1 year ago)
- Topics: ruby
- Language: Ruby
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Fix::Let
[][travis]
[][codeclimate]
[][gem]
[][inchpages]
[][rubydoc]
> Provides `let` method for memoized helper definition.
⚠️ This gem is no longer maintained,
as the `let` method was merged in to [Fix](https://github.com/fixrb/fix)
since the version [1.0.0.beta4](https://rubygems.org/gems/fix/versions/1.0.0.beta4).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'fix-let'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install fix-let
## Usage
Given this code:
```ruby
# duck_spec.rb
require 'fix/let'
class Duck
def swims
'So! Swoosh...'
end
end
Fix.describe Duck.new do
let(:famous_word) { 'So!' }
on :swims do
it { MUST eql "#{famous_word} Swoosh..." }
end
end
```
The output should look like this:
$ ruby duck_spec.rb
.
Ran 1 tests in 0.000243 seconds
100% compliant - 0 infos, 0 failures, 0 errors
## Contact
* Source code: https://github.com/fixrb/fix-let
## Versioning
__Fix::Let__ follows [Semantic Versioning 2.0](https://semver.org/).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
***
[gem]: https://rubygems.org/gems/fix-let
[travis]: https://travis-ci.org/fixrb/fix-let
[codeclimate]: https://codeclimate.com/github/fixrb/fix-let
[inchpages]: https://inch-ci.org/github/fixrb/fix-let
[rubydoc]: https://rubydoc.info/gems/fix-let/frames
