Class: Origen::Registers::Collector

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCollector

Returns a new instance of Collector.



251
252
253
# File 'lib/origen/registers.rb', line 251

def initialize
  @store = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &_block) ⇒ Object



255
256
257
# File 'lib/origen/registers.rb', line 255

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.



249
250
251
# File 'lib/origen/registers.rb', line 249

def store
  @store
end