Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/support.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *key) ⇒ Object

to_do: substitute with a delegation solution



14
15
16
17
18
19
# File 'lib/support.rb', line 14

def method_missing(method, *key)
  unless method == :to_hash || method == :to_str #|| method == :to_int
    return self.compact.map{|x| x.public_send(method, *key)}
  end

end