Class: Registry
- Inherits:
-
Object
- Object
- Registry
- Defined in:
- lib/csv2hash/registry.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, definition) ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
2 3 4 |
# File 'lib/csv2hash/registry.rb', line 2 def initialize @definitions = Hash.new end |
Instance Method Details
#[](name) ⇒ Object
6 7 8 |
# File 'lib/csv2hash/registry.rb', line 6 def [] name @definitions[name] end |
#[]=(name, definition) ⇒ Object
10 11 12 |
# File 'lib/csv2hash/registry.rb', line 10 def []= name, definition @definitions[name] = definition end |