README.md in inactive_support-0.1.0 vs README.md in inactive_support-1.0.0

- old
+ new

@@ -16,10 +16,42 @@ $ gem install inactive_support ## Usage -Soon +### Object +#### #identity +returns self + + [1,2,3,3,4,5,5].group_by(&:identity) + # => [[1], [2], [3,3], [4], [5,5]] + +#### #try +send a message to the receiver and if it doesn't respond to the message, return nil + + "".try(:some_method) + # => nil + +#### #ctry +chained try, for methods with no arguments + + "Somestring".ctry(:mb_chars, :downcase, :some_method) + # => nil + +### Hash +#### #delete_blank +Deletes all key/value pairs where the value is an empty string/array/hash or nil. + + { name: nil, age: 19, address: "" }.delete_blank + # => { age: 19 } + +### Enumerable +#### #consecutive_by +groups objects by an attribute that is consecutive + + [1,2,3,5,6,8,9].consecutive_by(&:identity) + # => [[1,2,3],[5,6],[8,9]] + ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)