Class: Twat::ArgWrapper
- Inherits:
-
Object
- Object
- Twat::ArgWrapper
- Defined in:
- lib/twat/argparse.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ ArgWrapper
constructor
A new instance of ArgWrapper.
- #method_missing(sym) ⇒ Object
Constructor Details
#initialize(data) ⇒ ArgWrapper
Returns a new instance of ArgWrapper.
3 4 5 |
# File 'lib/twat/argparse.rb', line 3 def initialize(data) @data = data end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym) ⇒ Object
7 8 9 |
# File 'lib/twat/argparse.rb', line 7 def method_missing(sym) @data[sym] end |