Class: Acb::Registry
- Inherits:
-
Object
- Object
- Acb::Registry
- Defined in:
- lib/acb/registry.rb
Defined Under Namespace
Classes: ColumnNotFound
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #lookup(key) ⇒ Object
- #push(master_column) ⇒ Object
Constructor Details
#initialize ⇒ Registry
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 |