Class: SlowServer::ServerConfig
- Defined in:
- lib/slow_server/config.rb
Instance Attribute Summary collapse
-
#response_body ⇒ Object
Returns the value of attribute response_body.
Attributes inherited from Config
#chunk_delay, #chunks, #port, #response_delay
Instance Method Summary collapse
-
#initialize ⇒ ServerConfig
constructor
A new instance of ServerConfig.
- #parse ⇒ Object
Methods inherited from Config
Constructor Details
#initialize ⇒ ServerConfig
Returns a new instance of ServerConfig.
35 36 37 38 |
# File 'lib/slow_server/config.rb', line 35 def initialize super self.response_body = File.read(File.("../../../files/response.txt", __FILE__)) end |
Instance Attribute Details
#response_body ⇒ Object
Returns the value of attribute response_body.
33 34 35 |
# File 'lib/slow_server/config.rb', line 33 def response_body @response_body end |
Instance Method Details
#parse ⇒ Object
40 41 42 43 |
# File 'lib/slow_server/config.rb', line 40 def parse response = args.join(" ") self.response_body = response unless response.empty? end |