Module: IfElse::FalseIfBehavior
- Included in:
- FalseClass, NilClass
- Defined in:
- lib/ifelse.rb
Instance Method Summary collapse
Instance Method Details
permalink #if ⇒ Object
[View source]
17 18 19 20 |
# File 'lib/ifelse.rb', line 17 def if raise "Syntax Error: if without block" unless block_given? self end |
permalink #unless {|_self| ... } ⇒ Object
22 23 24 25 |
# File 'lib/ifelse.rb', line 22 def unless raise "Syntax Error: unless without block" unless block_given? yield self end |