Class: CompanyNumber::Configuration
- Inherits:
-
Object
- Object
- CompanyNumber::Configuration
- Defined in:
- lib/company_number/configuration.rb
Instance Attribute Summary collapse
-
#custom_dictionary ⇒ Object
Returns the value of attribute custom_dictionary.
-
#excluded_countries ⇒ Object
Returns the value of attribute excluded_countries.
-
#strict_validation ⇒ Object
Returns the value of attribute strict_validation.
Instance Method Summary collapse
- #dictionary ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #strict_validation? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 |
# File 'lib/company_number/configuration.rb', line 9 def initialize @excluded_countries = [] @custom_dictionary = {} @strict_validation = nil end |
Instance Attribute Details
#custom_dictionary ⇒ Object
Returns the value of attribute custom_dictionary.
5 6 7 |
# File 'lib/company_number/configuration.rb', line 5 def custom_dictionary @custom_dictionary end |
#excluded_countries ⇒ Object
Returns the value of attribute excluded_countries.
5 6 7 |
# File 'lib/company_number/configuration.rb', line 5 def excluded_countries @excluded_countries end |
#strict_validation ⇒ Object
Returns the value of attribute strict_validation.
5 6 7 |
# File 'lib/company_number/configuration.rb', line 5 def strict_validation @strict_validation end |
Instance Method Details
#dictionary ⇒ Object
15 16 17 |
# File 'lib/company_number/configuration.rb', line 15 def dictionary @dictionary ||= CompanyNumber::Dictionary.new(@custom_dictionary) end |
#strict_validation? ⇒ Boolean
19 20 21 |
# File 'lib/company_number/configuration.rb', line 19 def strict_validation? !!@strict_validation end |