Class: Btce::PublicOperation

Inherits:
Object
  • Object
show all
Defined in:
lib/btce/api/operations/public_operation.rb

Direct Known Subclasses

Depth, Fee, Ticker, Trades

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation, pair, options = {}) ⇒ PublicOperation


41
42
43
44
45
46
# File 'lib/btce/api/operations/public_operation.rb', line 41

def initialize(operation, pair, options = {})
  @operation = operation
  @pair = pair
  @options = options
  load_json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json


39
40
41
# File 'lib/btce/api/operations/public_operation.rb', line 39

def json
  @json
end

#operationObject (readonly)

Returns the value of attribute operation


39
40
41
# File 'lib/btce/api/operations/public_operation.rb', line 39

def operation
  @operation
end

#optionsObject (readonly)

Returns the value of attribute options


39
40
41
# File 'lib/btce/api/operations/public_operation.rb', line 39

def options
  @options
end

#pairObject (readonly)

Returns the value of attribute pair


39
40
41
# File 'lib/btce/api/operations/public_operation.rb', line 39

def pair
  @pair
end

Instance Method Details

#load_jsonObject


48
49
50
# File 'lib/btce/api/operations/public_operation.rb', line 48

def load_json
  @json = PublicAPI.get_pair_operation_json pair, operation, options
end