Class: Apipony::Response

Inherits:
Base
  • Object
show all
Defined in:
lib/apipony/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, &block) ⇒ Response

Returns a new instance of Response.



4
5
6
7
8
# File 'lib/apipony/response.rb', line 4

def initialize(status, &block)
  @status = status

  instance_eval(&block) if block_given?
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



2
3
4
# File 'lib/apipony/response.rb', line 2

def body
  @body
end

#headersObject

Returns the value of attribute headers.



2
3
4
# File 'lib/apipony/response.rb', line 2

def headers
  @headers
end

#statusObject

Returns the value of attribute status.



2
3
4
# File 'lib/apipony/response.rb', line 2

def status
  @status
end