Class: ActiveMerchant::CountryCode

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/country.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ CountryCode

Returns a new instance of CountryCode.



12
13
14
15
# File 'lib/active_merchant/country.rb', line 12

def initialize(value)
  @value = value.to_s.upcase
  detect_format
end

Instance Attribute Details

#formatObject (readonly)

Returns the value of attribute format.



11
12
13
# File 'lib/active_merchant/country.rb', line 11

def format
  @format
end

#valueObject (readonly)

Returns the value of attribute value.



11
12
13
# File 'lib/active_merchant/country.rb', line 11

def value
  @value
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/active_merchant/country.rb', line 17

def to_s
  value
end