Class: Object

Inherits:
BasicObject
Defined in:
lib/tegu_gears/compose.rb,
lib/tegu_gears/dynamics/noodle.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object



57
58
59
# File 'lib/tegu_gears/dynamics/noodle.rb', line 57

def method_missing(sym, *args, &block)
  System.instance.send(sym, *args, &block)
end

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