Class: Mack::Utils::MethodList

Inherits:
Object
  • Object
show all
Defined in:
lib/mack-facets/utils/method_list.rb

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ MethodList

Returns a new instance of MethodList.



5
6
7
# File 'lib/mack-facets/utils/method_list.rb', line 5

def initialize(array)
  @__array = array
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



13
14
15
# File 'lib/mack-facets/utils/method_list.rb', line 13

def method_missing(sym, *args, &block)
  @__array.send(sym, *args, &block)
end

Instance Method Details

#include?(name) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/mack-facets/utils/method_list.rb', line 9

def include?(name)
  @__array.include?(v1_9? ? name.to_sym : name.to_s)
end