Class: Confuse::Namespace
- Inherits:
-
Object
- Object
- Confuse::Namespace
- Defined in:
- lib/confuse/namespace.rb
Overview
A Namespace is a container to keep configuration data seperate from the rest of the config.
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #add_item(name, opts = {}) ⇒ Object
-
#initialize(&block) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
#initialize(&block) ⇒ Namespace
Returns a new instance of Namespace.
9 10 11 12 |
# File 'lib/confuse/namespace.rb', line 9 def initialize(&block) @items = {} block.call(self) if block_given? end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
7 8 9 |
# File 'lib/confuse/namespace.rb', line 7 def items @items end |