Class: Olfactory::Dictionary

Inherits:
Hash
  • Object
show all
Defined in:
lib/olfactory/dictionary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  self.name = name
  self.scope = (options[:scope] || :global)
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/olfactory/dictionary.rb', line 3

def name
  @name
end

#scopeObject

Returns the value of attribute scope.



3
4
5
# File 'lib/olfactory/dictionary.rb', line 3

def scope
  @scope
end

Instance Method Details

#resetObject



9
10
11
# File 'lib/olfactory/dictionary.rb', line 9

def reset
  self.clear
end