Class: Coinone::Transaction::CoinHistory
- Inherits:
-
Object
- Object
- Coinone::Transaction::CoinHistory
- Defined in:
- lib/coinone/transaction/coin_history.rb,
lib/coinone/transaction/coin_history/history.rb
Defined Under Namespace
Classes: History
Instance Attribute Summary collapse
-
#histories ⇒ Object
readonly
Returns the value of attribute histories.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ CoinHistory
constructor
A new instance of CoinHistory.
- #update_histories(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ CoinHistory
Returns a new instance of CoinHistory.
12 13 14 15 16 17 18 19 20 |
# File 'lib/coinone/transaction/coin_history.rb', line 12 def initialize(={}) @result = [:result] || nil @histories = [] update_histories() end |
Instance Attribute Details
#histories ⇒ Object (readonly)
Returns the value of attribute histories.
10 11 12 |
# File 'lib/coinone/transaction/coin_history.rb', line 10 def histories @histories end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
9 10 11 |
# File 'lib/coinone/transaction/coin_history.rb', line 9 def result @result end |
Instance Method Details
#update_histories(params = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/coinone/transaction/coin_history.rb', line 22 def update_histories(params={}) @result = params[:result] if params.has_key? :result if !params[:transactions].nil? @histories = [] params[:transactions].each do |transaction| @histories.push(History.new(transaction)) end end end |