Method: DTAS::SplitFX#_bool

Defined in:
lib/dtas/splitfx.rb

#_bool(hash, key) ⇒ Object



95
96
97
98
99
100
101
102
103
# File 'lib/dtas/splitfx.rb', line 95

def _bool(hash, key)
  val = hash[key]
  case val
  when false, true then yield val
  when nil # ignore
  else
    raise TypeError, "'#{key}' must be boolean (true or false)"
  end
end