Module: Construqt::Regions

Defined in:
lib/construqt/regions.rb

Defined Under Namespace

Classes: Region

Class Method Summary collapse

Class Method Details

.add(name, network) ⇒ Object



21
22
23
24
25
26
# File 'lib/construqt/regions.rb', line 21

def self.add(name, network)
  throw "region names #{name} has to be unique" if @regions[name]
  ret = Region.new(name, network)
  @regions[name] = ret
  ret
end

.find(name) ⇒ Object



28
29
30
31
# File 'lib/construqt/regions.rb', line 28

def self.find(name)
  throw "region with name #{name} not found" unless @regions[name]
  @regions[name]
end