Class: XRBP::NodeStore::Rate
- Inherits:
-
Object
- Object
- XRBP::NodeStore::Rate
- Defined in:
- lib/xrbp/nodestore/protocol/rate.rb
Overview
Represents a transfer rate.
The percent of an amount sent that is charged to the sender and paid to the issuer.
From rippled docs:
Transfer rates are specified as fractions of 1 billion.
For example, a transfer rate of 1% is represented as
1,010,000,000.
Instance Attribute Summary collapse
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
Class Method Summary collapse
-
.parity ⇒ Object
Rate signifying a 1:1 exchange.
Instance Method Summary collapse
-
#initialize(rate = nil) ⇒ Rate
constructor
A new instance of Rate.
- #to_amount ⇒ Object
Constructor Details
#initialize(rate = nil) ⇒ Rate
Returns a new instance of Rate.
17 18 19 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 17 def initialize(rate=nil) @rate = rate end |
Instance Attribute Details
#rate ⇒ Object (readonly)
Returns the value of attribute rate.
15 16 17 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 15 def rate @rate end |
Class Method Details
.parity ⇒ Object
Rate signifying a 1:1 exchange
22 23 24 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 22 def self.parity @parity ||= Rate.new(QUALITY_ONE) end |