Module: RubyIs
- Defined in:
- lib/ruby_is.rb,
lib/ruby_is/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
Class Method Details
.block(&b) ⇒ Object
14 |
# File 'lib/ruby_is.rb', line 14 def block(&b); b; end |
.cache ⇒ Object
16 |
# File 'lib/ruby_is.rb', line 16 def cache; @@cache ||= {}; end |
.proc_or_block(args, block) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/ruby_is.rb', line 5 def proc_or_block(args, block) case when args.empty? && block then block when (args.count == 1) && block.nil? then args.first else raise "Incorrect syntax for `is` statement" end end |