Class: Jetra::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status = nil, body = nil, headers = nil) ⇒ Response

Returns a new instance of Response.



25
26
27
28
29
# File 'lib/jetra/base.rb', line 25

def initialize(status=nil, body=nil, headers=nil)
  @status = status.to_i
  @body = body
  @headers = headers
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



23
24
25
# File 'lib/jetra/base.rb', line 23

def body
  @body
end

#headersObject

Returns the value of attribute headers.



23
24
25
# File 'lib/jetra/base.rb', line 23

def headers
  @headers
end

#statusObject

Returns the value of attribute status.



23
24
25
# File 'lib/jetra/base.rb', line 23

def status
  @status
end

Instance Method Details

#finishObject



31
32
33
# File 'lib/jetra/base.rb', line 31

def finish
  self.freeze
end