Skip to content

Commit

Permalink
a better readme, and the example on the correct place. The gem is coming
Browse files Browse the repository at this point in the history
  • Loading branch information
danielribeiro committed Nov 6, 2010
1 parent 5233fe6 commit 176d36f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,25 @@ parenthesis. [More info](http://metaphysicaldeveloper.wordpress.com/2010/10/31/r

Quick Example
----
The example consists of getting all instance methods of String, Array, Class that end with 'd?'

require 'ruby_underscore'

class MethodFinder
include RubyUnderscore::Base

def find_interrogation_methods
[String, Array, Class].map(_.public_instance_methods.grep /d\?$/).flatten.sort.uniq
end
end
p MethodFinder.new.find_interrogation_methods


Using Ruby Underscore
----
As in the example above, simply by including the module include RubyUnderscore::Base on the
class, all methods (class methods as well) will allow you to use the underscore symbol to
write simple blocks.


Meta
Expand Down
11 changes: 0 additions & 11 deletions lib/example.rb

This file was deleted.

0 comments on commit 176d36f

Please sign in to comment.