class Construqt::Racks

Attributes

racks[R]
region[R]

Public Class Methods

new(region) click to toggle source
# File lib/construqt/rack.rb, line 8
def initialize(region)
  @region = region
  @racks = {}
end

Public Instance Methods

add_rack(name) click to toggle source
# File lib/construqt/rack.rb, line 36
def add_rack(name)
  throw "Rack with name exist #{name}" if @racks[name]
  rack = Rack.new(name)
  @racks[name] = rack
  rack
end
find_rack(name) click to toggle source
# File lib/construqt/rack.rb, line 43
def find_rack(name)
  throw "Rack with name does not exist #{name}" unless @racks[name]
  @racks[name]
end