Class: NilClass

Inherits:
Object show all
Defined in:
lib/stish.rb

Instance Method Summary collapse

Instance Method Details

#if_nil(arg = nil, &block) ⇒ Object



16
17
18
19
# File 'lib/stish.rb', line 16

def if_nil(arg = nil, &block)
	return yield if block_given?
	return arg
end

#if_not_nil(arg = nil, &block) ⇒ Object



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

def if_not_nil(arg = nil, &block)
	return self
end