Class: Csv2hash::Registry
- Inherits:
-
Object
- Object
- Csv2hash::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.
3 4 5 |
# File 'lib/csv2hash/registry.rb', line 3 def initialize @definitions = Hash.new end |
Instance Method Details
#[](name) ⇒ Object
7 8 9 |
# File 'lib/csv2hash/registry.rb', line 7 def [] name @definitions[name] end |
#[]=(name, definition) ⇒ Object
11 12 13 |
# File 'lib/csv2hash/registry.rb', line 11 def []= name, definition @definitions[name] = definition end |