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 = 0, body = nil) ⇒ Response

Returns a new instance of Response.



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

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

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



21
22
23
# File 'lib/jetra/base.rb', line 21

def body
  @body
end

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/jetra/base.rb', line 21

def status
  @status
end

Instance Method Details

#finishObject



28
29
30
# File 'lib/jetra/base.rb', line 28

def finish
  self.freeze
end