Class: Bibox::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/bibox/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
# File 'lib/bibox/configuration.rb', line 5

def initialize
  self.key              =   nil
  self.secret           =   nil
  
  self.faraday          =   {
    adapter:    :net_http,
    user_agent: 'Bibox Ruby',
    verbose:    false
  }
end

Instance Attribute Details

#faradayObject

Returns the value of attribute faraday.



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

def faraday
  @faraday
end

#keyObject

Returns the value of attribute key.



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

def key
  @key
end

#secretObject

Returns the value of attribute secret.



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

def secret
  @secret
end

Instance Method Details

#verbose_faraday?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/bibox/configuration.rb', line 16

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