Class: Wrappix::Configuration
- Inherits:
-
Object
- Object
- Wrappix::Configuration
- Defined in:
- lib/wrappix/configuration.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
- #add_resource(name, options = {}) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 |
# File 'lib/wrappix/configuration.rb', line 8 def initialize @base_url = nil @headers = {} @timeout = 30 @resources = {} end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/wrappix/configuration.rb', line 5 def base_url @base_url end |
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/wrappix/configuration.rb', line 5 def headers @headers end |
#resources ⇒ Object
Returns the value of attribute resources.
6 7 8 |
# File 'lib/wrappix/configuration.rb', line 6 def resources @resources end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/wrappix/configuration.rb', line 5 def timeout @timeout end |
Instance Method Details
#add_resource(name, options = {}) ⇒ Object
15 16 17 |
# File 'lib/wrappix/configuration.rb', line 15 def add_resource(name, = {}) @resources[name.to_sym] = end |