Sha256: ed7595fc649bf9e5688f658332fa44265251cd2fc38a266d77916750f859dc88
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
[](https://travis-ci.org/osyo-manga/gem-iolite) # Iolite Lazy block library. ## Installation Add this line to your application's Gemfile: gem 'iolite' And then execute: $ bundle Or install it yourself as: $ gem install iolite ## Usage ```ruby require "iolite" ####################################### # Using block ####################################### p (1..5).map { |it| it + 3 } # => [4, 5, 6, 7, 8] p (1..5).inject { |memo, item| memo + item } # => 15 p ["homu", "mami", "an"].inject(0) { |memo, item| memo + item.length } # => 10 p [{name: :homu}, {name: :mami}].map { |it| it[:name] } # => [:homu, :mami] ####################################### # Using iolite ####################################### # using arg1, arg2... include Iolite::Placeholders p (1..5).map &arg1 + 3 # => [4, 5, 6, 7, 8] p (1..5).inject &arg1 + arg2 # => 15 p ["homu", "mami", "an"].inject 0, &arg1 + arg2.length # => 10 p [{name: :homu}, {name: :mami}].map &arg1[:name] # => [:homu, :mami] ``` ## Contributing 1. Fork it ( https://github.com/osyo-manga/gem-iolite ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request ## Release note ### v0.0.2 * Fix Iolite::Statement module method. * Add `iolite/adaptored/proc_with_callable`. ### v0.0.1 * Release
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iolite-0.0.2 | README.md |