Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/tegu_gears/compose.rb,
lib/tegu_gears/dynamics/noodle.rb
Instance Method Summary collapse
-
#compose(*args) ⇒ Object
Composes any number of functions.
- #method_missing(sym, *args, &block) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Method Details
#compose(*args) ⇒ Object
Composes any number of functions. The first argument is the input. Use Struct if the argument list needs to be more expansive.
16 17 18 19 |
# File 'lib/tegu_gears/compose.rb', line 16 def compose(*args) param = args.shift args.inject {|composition, f| make_binomial_composition(composition, f)}.call(param) end |