Class: Acb::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/acb/registry.rb

Defined Under Namespace

Classes: ColumnNotFound

Instance Method Summary collapse

Constructor Details

#initializeRegistry

Returns a new instance of Registry.



7
8
9
# File 'lib/acb/registry.rb', line 7

def initialize
  @registrations = []
end

Instance Method Details

#lookup(key) ⇒ Object



15
16
17
# File 'lib/acb/registry.rb', line 15

def lookup(key)
  @registrations.find { |registration| registration.key == key } or raise ColumnNotFound
end

#push(master_column) ⇒ Object



11
12
13
# File 'lib/acb/registry.rb', line 11

def push(master_column)
  @registrations.push(master_column)
end