Sha256: 2c590bde77a633169eca4cb1b8f45e68d7c1fc07cdadcdbc350915c306a1734c

Contents?: true

Size: 380 Bytes

Versions: 9

Compression:

Stored size: 380 Bytes

Contents

class Forgery

  class Dictionaries

    def initialize
      @dictionaries = {}
    end

    def [](key)
      symbolized_key = key.to_sym
      @dictionaries[symbolized_key] ||= Forgery::Extend(FileReader.read_dictionary(symbolized_key))
    end

    def loaded?(key)
      @dictionaries.has_key?(key.to_sym)
    end

    def reset!
      @dictionaries = {}
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
forgery-0.8.1 lib/forgery/dictionaries.rb
forgery-0.7.0 lib/forgery/dictionaries.rb
forgery-0.6.0 lib/forgery/dictionaries.rb
forgery-0.5.0 lib/forgery/dictionaries.rb
forgery-0.4.4 lib/forgery/dictionaries.rb
forgery-0.4.3 lib/forgery/dictionaries.rb
forgery-0.4.2 lib/forgery/dictionaries.rb
forgery-0.4.1 lib/forgery/dictionaries.rb
forgery-0.4.0 lib/forgery/dictionaries.rb