Class: Bibox::Configuration
- Inherits:
-
Object
- Object
- Bibox::Configuration
- Defined in:
- lib/bibox/configuration.rb
Instance Attribute Summary collapse
-
#faraday ⇒ Object
Returns the value of attribute faraday.
-
#key ⇒ Object
Returns the value of attribute key.
-
#secret ⇒ Object
Returns the value of attribute secret.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #verbose_faraday? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
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
#faraday ⇒ Object
Returns the value of attribute faraday.
3 4 5 |
# File 'lib/bibox/configuration.rb', line 3 def faraday @faraday end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/bibox/configuration.rb', line 3 def key @key end |
#secret ⇒ Object
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
16 17 18 |
# File 'lib/bibox/configuration.rb', line 16 def verbose_faraday? self.faraday.fetch(:verbose, false) end |