Class: TelephoneNumber::NumberValidation

Inherits:
Object
  • Object
show all
Defined in:
lib/telephone_number/number_validation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/telephone_number/number_validation.rb', line 3

def name
  @name
end

#patternObject (readonly)

Returns the value of attribute pattern.



3
4
5
# File 'lib/telephone_number/number_validation.rb', line 3

def pattern
  @pattern
end