Class: Spurious::Server::State::Base
- Inherits:
-
Object
- Object
- Spurious::Server::State::Base
- Defined in:
- lib/spurious/server/state/base.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#connection ⇒ Object
Returns the value of attribute connection.
Instance Method Summary collapse
- #connection_timeouts(connect = 1, read = 5, write = 5) ⇒ Object
- #execute! ⇒ Object
-
#initialize(connection, config) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(connection, config) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 |
# File 'lib/spurious/server/state/base.rb', line 12 def initialize(connection, config) @connection = connection @config = config connection_timeouts end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
10 11 12 |
# File 'lib/spurious/server/state/base.rb', line 10 def config @config end |
#connection ⇒ Object
Returns the value of attribute connection.
10 11 12 |
# File 'lib/spurious/server/state/base.rb', line 10 def connection @connection end |
Instance Method Details
#connection_timeouts(connect = 1, read = 5, write = 5) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/spurious/server/state/base.rb', line 18 def connection_timeouts(connect = 1, read = 5, write = 5) Excon.defaults[:write_timeout] = write Excon.defaults[:read_timeout] = read Excon.defaults[:connect_timeout] = connect Excon.defaults[:ssl_verify_peer] = false end |
#execute! ⇒ Object
25 26 27 |
# File 'lib/spurious/server/state/base.rb', line 25 def execute! raise NotImplementedError("You must implement execute!") end |