Class: Upperkut::Configuration

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#polling_intervalObject

Returns the value of attribute polling_interval.



57
58
59
# File 'lib/upperkut.rb', line 57

def polling_interval
  @polling_interval
end

#strategyObject

Returns the value of attribute strategy.



57
58
59
# File 'lib/upperkut.rb', line 57

def strategy
  @strategy
end

Class Method Details

.defaultObject



59
60
61
62
63
# File 'lib/upperkut.rb', line 59

def self.default
  new.tap do |config|
    config.polling_interval = Integer(ENV['UPPERKUT_POLLING_INTERVAL'] || 5)
  end
end

Instance Method Details

#client_middlewares {|@client_middlewares| ... } ⇒ Object

Yields:



71
72
73
74
75
# File 'lib/upperkut.rb', line 71

def client_middlewares
  @client_middlewares ||= Middleware::Chain.new
  yield @client_middlewares if block_given?
  @client_middlewares
end

#server_middlewares {|@server_middlewares| ... } ⇒ Object

Yields:



65
66
67
68
69
# File 'lib/upperkut.rb', line 65

def server_middlewares
  @server_middlewares ||= init_middleware_chain
  yield @server_middlewares if block_given?
  @server_middlewares
end