Class: Origen::Utility::Collector

Inherits:
Object
  • Object
show all
Defined in:
lib/origen/utility/collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCollector

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

#storeObject (readonly)

Returns the value of attribute store.



4
5
6
# File 'lib/origen/utility/collector.rb', line 4

def store
  @store
end