Class: Olfactory::Dictionary
- Inherits:
-
Hash
- Object
- Hash
- Olfactory::Dictionary
- Defined in:
- lib/olfactory/dictionary.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#scope ⇒ Object
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Dictionary
constructor
A new instance of Dictionary.
- #reset ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Dictionary
Returns a new instance of Dictionary.
5 6 7 8 |
# File 'lib/olfactory/dictionary.rb', line 5 def initialize(name, = {}) self.name = name self.scope = ([:scope] || :global) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/olfactory/dictionary.rb', line 3 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
3 4 5 |
# File 'lib/olfactory/dictionary.rb', line 3 def scope @scope end |
Instance Method Details
#reset ⇒ Object
9 10 11 |
# File 'lib/olfactory/dictionary.rb', line 9 def reset self.clear end |