Class: Sitespec::Response
- Inherits:
-
Object
- Object
- Sitespec::Response
- Defined in:
- lib/sitespec/response.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(status, header, body) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status, header, body) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/sitespec/response.rb', line 5 def initialize(status, header, body) @body = body @header = header @status = status end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/sitespec/response.rb', line 3 def header @header end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/sitespec/response.rb', line 3 def status @status end |
Instance Method Details
#body ⇒ Object
11 12 13 14 15 |
# File 'lib/sitespec/response.rb', line 11 def body lines = [] @body.each {|line| lines << line } lines.join end |