Class: RuBittrex::Address

Inherits:
Object
  • Object
show all
Extended by:
ClientHelper
Defined in:
lib/ru_bittrex/address.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Address

Returns a new instance of Address.



7
8
9
10
11
12
# File 'lib/ru_bittrex/address.rb', line 7

def initialize(attrs = {})
  @status   = attrs["status"]
  @currency = attrs["currencySymbol"]
  @address  = attrs["cryptoAddress"]
  @raw      = attrs
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



5
6
7
# File 'lib/ru_bittrex/address.rb', line 5

def address
  @address
end

#currencyObject (readonly)

Returns the value of attribute currency.



5
6
7
# File 'lib/ru_bittrex/address.rb', line 5

def currency
  @currency
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/ru_bittrex/address.rb', line 5

def raw
  @raw
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/ru_bittrex/address.rb', line 5

def status
  @status
end

Class Method Details

.all(params = {}) ⇒ Object



14
15
16
# File 'lib/ru_bittrex/address.rb', line 14

def self.all(params = {})
  collection _get('addresses', params)
end

.get(currency, params = {}) ⇒ Object



18
19
20
# File 'lib/ru_bittrex/address.rb', line 18

def self.get(currency, params = {})
  new _get("addresses/#{currency}", params)
end