Class: XRBP::NodeStore::Issue
- Inherits:
-
Object
- Object
- XRBP::NodeStore::Issue
- Defined in:
- lib/xrbp/nodestore/protocol/issue.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
Instance Method Summary collapse
-
#initialize(currency, account) ⇒ Issue
constructor
A new instance of Issue.
- #inspect ⇒ Object
- #to_h ⇒ Object
- #xrp? ⇒ Boolean
Constructor Details
#initialize(currency, account) ⇒ Issue
Returns a new instance of Issue.
6 7 8 9 |
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 6 def initialize(currency, account) @currency = currency @account = account end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
4 5 6 |
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 4 def account @account end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 4 def currency @currency end |
Instance Method Details
#inspect ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 19 def inspect c = currency == NodeStore.no_currency ? '' : currency == NodeStore.xrp_currency ? 'XRP' : "#{currency}" a = account == Crypto.no_account ? '' : account == Crypto.xrp_account ? '' : "@#{account}" "#{c}#{a}" end |
#to_h ⇒ Object
11 12 13 |
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 11 def to_h {:currency => currency, :account => account} end |