Module: Kansuu::Control
- Extended by:
- Util
- Defined in:
- lib/kansuu/control.rb
Instance Method Summary collapse
Methods included from Util
__define_func_from_method, __define_funcs_from_method, __module_functionize
Instance Method Details
#except ⇒ Object
13 14 15 16 17 |
# File 'lib/kansuu/control.rb', line 13 def except -> f, g, x { f[x] ? x : g[x] } % 3 end |
#when_ ⇒ Object
7 8 9 10 11 |
# File 'lib/kansuu/control.rb', line 7 def when_ -> f, g, x { f[x] ? g[x] : x } % 3 end |