Class: NumbersAndWords::Strategies::FiguresConverter::Options::Proxy
- Inherits:
-
Object
- Object
- NumbersAndWords::Strategies::FiguresConverter::Options::Proxy
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Instance Method Summary collapse
-
#initialize(strategy, options) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(method_name, *args, &block) ⇒ Object
Constructor Details
#initialize(strategy, options) ⇒ Proxy
Returns a new instance of Proxy.
16 17 18 19 |
# File 'lib/numbers_and_words/strategies/figures_converter/options.rb', line 16 def initialize(strategy, ) @strategy = strategy = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/numbers_and_words/strategies/figures_converter/options.rb', line 21 def method_missing(method_name, *args, &block) Object.const_get(proxy_class_name(method_name)).new self, args, block rescue NameError return nil end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
14 15 16 |
# File 'lib/numbers_and_words/strategies/figures_converter/options.rb', line 14 def end |
#strategy ⇒ Object
Returns the value of attribute strategy.
14 15 16 |
# File 'lib/numbers_and_words/strategies/figures_converter/options.rb', line 14 def strategy @strategy end |