Module: IfElse::TrueIfBehavior
- Included in:
- Object
- Defined in:
- lib/ifelse.rb
Instance Method Summary collapse
Instance Method Details
#if {|_self| ... } ⇒ Object
5 6 7 8 |
# File 'lib/ifelse.rb', line 5 def if raise "Syntax Error: if without block" unless block_given? yield self end |
#unless ⇒ Object
10 11 12 13 |
# File 'lib/ifelse.rb', line 10 def unless raise "Syntax Error: unless without block" unless block_given? false end |