Class: BasicObject

Defined in:
lib/if.rb

Instance Method Summary collapse

Instance Method Details

#if(if_true, _options = {}) ⇒ Object



2
3
4
# File 'lib/if.rb', line 2

def if(if_true, _options = {})
  if_true.call
end

#if_falseObject



12
13
14
# File 'lib/if.rb', line 12

def if_false
  self
end

#if_trueObject



6
7
8
9
10
# File 'lib/if.rb', line 6

def if_true
  yield

  self
end