Class: Simplepay::Support::Currency
- Inherits:
-
Object
- Object
- Simplepay::Support::Currency
- Defined in:
- lib/simplepay/support/currency.rb
Overview
Contains a name, recognized code, and basic formatting for a particular international monetary currency.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, code, format) ⇒ Currency
constructor
A new instance of Currency.
- #to_s ⇒ Object
Constructor Details
#initialize(name, code, format) ⇒ Currency
Returns a new instance of Currency.
11 12 13 |
# File 'lib/simplepay/support/currency.rb', line 11 def initialize(name, code, format) @name, @code, @format = name, code, format end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/simplepay/support/currency.rb', line 9 def code @code end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
9 10 11 |
# File 'lib/simplepay/support/currency.rb', line 9 def format @format end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/simplepay/support/currency.rb', line 9 def name @name end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/simplepay/support/currency.rb', line 15 def to_s "#{code}" end |