Class: GetArgs::ArgumentList
- Inherits:
-
Object
- Object
- GetArgs::ArgumentList
- Defined in:
- lib/argument_list.rb
Instance Method Summary collapse
-
#initialize(args_array) ⇒ ArgumentList
constructor
A new instance of ArgumentList.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize(args_array) ⇒ ArgumentList
Returns a new instance of ArgumentList.
3 4 5 |
# File 'lib/argument_list.rb', line 3 def initialize(args_array) @arguments = args_array.map { |arg| Argument.new(arg) } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
7 8 9 |
# File 'lib/argument_list.rb', line 7 def method_missing(*args, &block) @arguments.send(*args, &block) end |