Class: Vertpig::Currency
- Inherits:
-
Object
- Object
- Vertpig::Currency
- Defined in:
- lib/vertpig/currency.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
readonly
Returns the value of attribute abbreviation.
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#minimum_confirmation ⇒ Object
(also: #min_confirmation)
readonly
Returns the value of attribute minimum_confirmation.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#transaction_fee ⇒ Object
(also: #fee)
readonly
Returns the value of attribute transaction_fee.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Currency
constructor
A new instance of Currency.
Constructor Details
#initialize(attrs = {}) ⇒ Currency
Returns a new instance of Currency.
8 9 10 11 12 13 14 15 |
# File 'lib/vertpig/currency.rb', line 8 def initialize(attrs = {}) @name = attrs['CurrencyLong'] @abbreviation = attrs['Currency'] @transaction_fee = attrs['TxFee'] @minimum_confirmation = attrs['MinConfirmation'] @active = attrs['IsActive'] @raw = attrs end |
Instance Attribute Details
#abbreviation ⇒ Object (readonly)
Returns the value of attribute abbreviation.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def abbreviation @abbreviation end |
#active ⇒ Object (readonly)
Returns the value of attribute active.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def active @active end |
#minimum_confirmation ⇒ Object (readonly) Also known as: min_confirmation
Returns the value of attribute minimum_confirmation.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def minimum_confirmation @minimum_confirmation end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def raw @raw end |
#transaction_fee ⇒ Object (readonly) Also known as: fee
Returns the value of attribute transaction_fee.
3 4 5 |
# File 'lib/vertpig/currency.rb', line 3 def transaction_fee @transaction_fee end |
Class Method Details
.all ⇒ Object
17 18 19 |
# File 'lib/vertpig/currency.rb', line 17 def self.all client.get('public/getcurrencies').map{|data| new(data) } end |