Class: Origen::Utility::Collector
- Defined in:
- lib/origen/utility/collector.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize ⇒ Collector
constructor
A new instance of Collector.
- #method_missing(method, *args, &_block) ⇒ Object
Constructor Details
#initialize ⇒ Collector
Returns a new instance of Collector.
6 7 8 |
# File 'lib/origen/utility/collector.rb', line 6 def initialize @store = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &_block) ⇒ Object
10 11 12 |
# File 'lib/origen/utility/collector.rb', line 10 def method_missing(method, *args, &_block) @store[method.to_s.sub('=', '').to_sym] = args.first end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
4 5 6 |
# File 'lib/origen/utility/collector.rb', line 4 def store @store end |