Class: ITU::E164::Result
- Inherits:
-
Data
- Object
- Data
- ITU::E164::Result
- Defined in:
- lib/itu/e164/result.rb
Instance Attribute Summary collapse
-
#canonical ⇒ Object
readonly
Returns the value of attribute canonical.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#dataset_version ⇒ Object
readonly
Returns the value of attribute dataset_version.
-
#digits ⇒ Object
readonly
Returns the value of attribute digits.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#national_number ⇒ Object
readonly
Returns the value of attribute national_number.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#standard_version ⇒ Object
readonly
Returns the value of attribute standard_version.
Instance Method Summary collapse
Instance Attribute Details
#canonical ⇒ Object (readonly)
Returns the value of attribute canonical
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def canonical @canonical end |
#category ⇒ Object (readonly)
Returns the value of attribute category
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def category @category end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def country_code @country_code end |
#dataset_version ⇒ Object (readonly)
Returns the value of attribute dataset_version
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def dataset_version @dataset_version end |
#digits ⇒ Object (readonly)
Returns the value of attribute digits
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def digits @digits end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def errors @errors end |
#input ⇒ Object (readonly)
Returns the value of attribute input
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def input @input end |
#national_number ⇒ Object (readonly)
Returns the value of attribute national_number
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def national_number @national_number end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def profile @profile end |
#standard_version ⇒ Object (readonly)
Returns the value of attribute standard_version
5 6 7 |
# File 'lib/itu/e164/result.rb', line 5 def standard_version @standard_version end |
Instance Method Details
#conformant? ⇒ Boolean
17 18 19 |
# File 'lib/itu/e164/result.rb', line 17 def conformant? errors.empty? end |
#error_codes ⇒ Object
25 26 27 |
# File 'lib/itu/e164/result.rb', line 25 def error_codes errors.map(&:code).freeze end |
#failure? ⇒ Boolean
21 22 23 |
# File 'lib/itu/e164/result.rb', line 21 def failure? !conformant? end |
#to_h ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/itu/e164/result.rb', line 29 def to_h { input:, profile:, standard_version:, dataset_version:, digits:, canonical:, category:, country_code:, national_number:, conformant: conformant?, errors: errors.map(&:to_h) } end |