Method: StructuraidCore::Engineering::Locations::Collection#add

Defined in:
lib/structuraid_core/engineering/locations/collection.rb

#add(location) ⇒ Object



15
16
17
18
19
# File 'lib/structuraid_core/engineering/locations/collection.rb', line 15

def add(location)
  raise DuplicateLabelError, location.label if find_by_label(location.label)

  locations.push(location)
end