Class: XRBP::NodeStore::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/xrbp/nodestore/protocol/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, )
  @currency = currency
  @account  = 
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



4
5
6
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 4

def 
  @account
end

#currencyObject (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

#inspectObject



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 =  == Crypto.  ? '' :
       == Crypto. ? '' :
                           "@#{}"
  "#{c}#{a}"
end

#to_hObject



11
12
13
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 11

def to_h
  {:currency => currency, :account => }
end

#xrp?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/xrbp/nodestore/protocol/issue.rb', line 15

def xrp?
  self == NodeStore.xrp_issue
end