Method: Origen::Location::Map::ClassMethods#define_locations

Defined in:
lib/origen/location/map.rb

#define_locations(defaults = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/origen/location/map.rb', line 8

def define_locations(defaults = {})
  @x = @x ? (@x + 1) : 0  # Provides a unique ID for each define_locations block
  default_attributes[@x] = defaults
  @defining = true
  yield
  @defining = false
end