Class: TelephoneNumber::NumberValidation
- Inherits:
-
Object
- Object
- TelephoneNumber::NumberValidation
- Defined in:
- lib/telephone_number/number_validation.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(name, data_hash) ⇒ NumberValidation
constructor
A new instance of NumberValidation.
Constructor Details
#initialize(name, data_hash) ⇒ NumberValidation
Returns a new instance of NumberValidation.
5 6 7 8 |
# File 'lib/telephone_number/number_validation.rb', line 5 def initialize(name, data_hash) @name = name @pattern = data_hash[:national_number_pattern] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/telephone_number/number_validation.rb', line 3 def name @name end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
3 4 5 |
# File 'lib/telephone_number/number_validation.rb', line 3 def pattern @pattern end |