Class: Bitstamper::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/bitstamper/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/bitstamper/configuration.rb', line 5

def initialize
  self.key              =   nil
  self.secret           =   nil
  self.client_id        =   nil
  
  self.pusher_app_key   =   "de504dc5763aeef9ff52"
  
  self.faraday          =   {
    adapter:    :net_http,
    user_agent: 'Bitstamp Ruby',
    verbose:    false
  }
  
  self.products         =   [
    "btceur",
    "eurusd",
    "xrpusd",
    "xrpeur",
    "xrpbtc",
    "ltcusd",
    "ltceur",
    "ltcbtc",
    "ethusd",
    "etheur",
    "ethbtc",
    "bchusd",
    "bcheur",
    "bchbtc"
  ]
end

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def client_id
  @client_id
end

#faradayObject

Returns the value of attribute faraday.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def faraday
  @faraday
end

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def key
  @key
end

#productsObject

Returns the value of attribute products.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def products
  @products
end

#pusher_app_keyObject

Returns the value of attribute pusher_app_key.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def pusher_app_key
  @pusher_app_key
end

#secretObject

Returns the value of attribute secret.



3
4
5
# File 'lib/bitstamper/configuration.rb', line 3

def secret
  @secret
end

Instance Method Details

#verbose_faraday?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/bitstamper/configuration.rb', line 36

def verbose_faraday?
  self.faraday.fetch(:verbose, false)
end