Class: NsOptions::Namespaces
- Inherits:
-
Hash
- Object
- Hash
- NsOptions::Namespaces
- Defined in:
- lib/ns-options/namespaces.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
- #add(name, key, parent = nil, &block) ⇒ Object
- #get(name) ⇒ Object
Instance Method Details
#[](name) ⇒ Object
5 6 7 |
# File 'lib/ns-options/namespaces.rb', line 5 def [](name) super(name.to_sym) end |
#[]=(name, value) ⇒ Object
8 9 10 |
# File 'lib/ns-options/namespaces.rb', line 8 def []=(name, value) super(name.to_sym, value) end |
#add(name, key, parent = nil, &block) ⇒ Object
12 13 14 |
# File 'lib/ns-options/namespaces.rb', line 12 def add(name, key, parent = nil, &block) self[name] = NsOptions::Namespace.new(key, parent, &block) end |
#get(name) ⇒ Object
16 17 18 |
# File 'lib/ns-options/namespaces.rb', line 16 def get(name) self[name] end |