Class: Mack::Utils::MethodList
- Defined in:
- lib/mack-facets/utils/method_list.rb
Instance Method Summary collapse
- #include?(name) ⇒ Boolean
-
#initialize(array) ⇒ MethodList
constructor
A new instance of MethodList.
- #method_missing(sym, *args, &block) ⇒ Object
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
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 |