Sha256: 0f6e7ad6ad3162964f705ee51dfe2319e15f70511ae1d811a2bf60d0a8a53761
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
[![Build Status](https://travis-ci.org/osyo-manga/gem-iolite.svg?branch=master)](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.3 * Fix dcs typo. ### 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.3 | README.md |