Class: XRBP::NodeStore::Rate
- Inherits:
-
Object
- Object
- XRBP::NodeStore::Rate
- Defined in:
- lib/xrbp/nodestore/protocol/rate.rb
Instance Attribute Summary collapse
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
Class Method Summary collapse
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.
6 7 8 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 6 def initialize(rate=nil) @rate = rate end |
Instance Attribute Details
#rate ⇒ Object (readonly)
Returns the value of attribute rate.
4 5 6 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 4 def rate @rate end |
Class Method Details
.parity ⇒ Object
10 11 12 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 10 def self.parity @parity ||= Rate.new(QUALITY_ONE) end |
Instance Method Details
#to_amount ⇒ Object
14 15 16 17 18 |
# File 'lib/xrbp/nodestore/protocol/rate.rb', line 14 def to_amount STAmount.new :issue => Issue.no_issue, :mantissa => rate, :exponent => -9 end |