Class: Wrappix::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @resources[name.to_sym] = options
end