Class: Forgery::Dictionaries
- Inherits:
-
Object
- Object
- Forgery::Dictionaries
- Defined in:
- lib/forgery/dictionaries.rb
Instance Method Summary (collapse)
- - (Object) [](key)
-
- (Dictionaries) initialize
constructor
A new instance of Dictionaries.
- - (Boolean) loaded?(key)
- - (Object) reset!
Constructor Details
- (Dictionaries) initialize
A new instance of Dictionaries
5 6 7 |
# File 'lib/forgery/dictionaries.rb', line 5 def initialize @dictionaries = {} end |
Instance Method Details
- (Object) [](key)
9 10 11 12 |
# File 'lib/forgery/dictionaries.rb', line 9 def [](key) symbolized_key = key.to_sym @dictionaries[symbolized_key] ||= Forgery::Extend(FileReader.read_dictionary(symbolized_key)) end |
- (Boolean) loaded?(key)
14 15 16 |
# File 'lib/forgery/dictionaries.rb', line 14 def loaded?(key) @dictionaries.has_key?(key.to_sym) end |
- (Object) reset!
18 19 20 |
# File 'lib/forgery/dictionaries.rb', line 18 def reset! @dictionaries = {} end |