Method: Array#method_missing

Defined in:
lib/support/conversions.rb

#method_missing(method, *args, &b) ⇒ Object

it is assumed that the first element of the array acts as master .



94
95
96
97
98
99
100
101
# File 'lib/support/conversions.rb', line 94

def method_missing method, *args, &b
	return if [:to_hash, :to_str].include? method
   if @@accepted_methods.include?( method ) || first.invariant_attributes.include?( method )
     self.map{ |x| x.public_send method, *args, &b }
   else
     raise ArgumentError.new("Method #{method} does not exist in class #{first.class}")
   end
end