Class: CompanyNumber::Dictionary
- Inherits:
-
Object
- Object
- CompanyNumber::Dictionary
- Defined in:
- lib/company_number/dictionary.rb
Instance Attribute Summary collapse
-
#country_codes_metadata ⇒ Object
readonly
Returns the value of attribute country_codes_metadata.
-
#default_hash ⇒ Object
readonly
Returns the value of attribute default_hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(country_codes_metadata = {}) ⇒ Dictionary
constructor
A new instance of Dictionary.
- #values ⇒ Object
Constructor Details
#initialize(country_codes_metadata = {}) ⇒ Dictionary
Returns a new instance of Dictionary.
11 12 13 14 15 16 |
# File 'lib/company_number/dictionary.rb', line 11 def initialize( = {}) @country_codes_metadata = @default_hash = load_default_hash end |
Instance Attribute Details
#country_codes_metadata ⇒ Object (readonly)
Returns the value of attribute country_codes_metadata.
5 6 7 |
# File 'lib/company_number/dictionary.rb', line 5 def @country_codes_metadata end |
#default_hash ⇒ Object (readonly)
Returns the value of attribute default_hash.
5 6 7 |
# File 'lib/company_number/dictionary.rb', line 5 def default_hash @default_hash end |
Class Method Details
.default_dictionary_path ⇒ Object
7 8 9 |
# File 'lib/company_number/dictionary.rb', line 7 def self.default_dictionary_path File.join(File.dirname(__FILE__), "../../config/dictionary.json") end |
Instance Method Details
#values ⇒ Object
18 19 20 |
# File 'lib/company_number/dictionary.rb', line 18 def values @_values ||= fetch_values end |