Class: Upperkut::Configuration
- Inherits:
-
Object
- Object
- Upperkut::Configuration
- Defined in:
- lib/upperkut.rb
Instance Attribute Summary collapse
-
#polling_interval ⇒ Object
Returns the value of attribute polling_interval.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Class Method Summary collapse
Instance Method Summary collapse
- #client_middlewares {|@client_middlewares| ... } ⇒ Object
- #server_middlewares {|@server_middlewares| ... } ⇒ Object
Instance Attribute Details
#polling_interval ⇒ Object
Returns the value of attribute polling_interval.
57 58 59 |
# File 'lib/upperkut.rb', line 57 def polling_interval @polling_interval end |
#strategy ⇒ Object
Returns the value of attribute strategy.
57 58 59 |
# File 'lib/upperkut.rb', line 57 def strategy @strategy end |
Class Method Details
.default ⇒ Object
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
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
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 |