Class: Kanpachi::Response

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

Defined Under Namespace

Modules: Representation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Response

Returns a new instance of Response.



13
14
15
16
17
18
# File 'lib/kanpachi/response.rb', line 13

def initialize(name)
  @name = name
  @status = 200
  @headers = {}
  @representation = Module.new { include Representation }
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



9
10
11
# File 'lib/kanpachi/response.rb', line 9

def headers
  @headers
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/kanpachi/response.rb', line 8

def name
  @name
end

#representationObject

Returns the value of attribute representation.



11
12
13
# File 'lib/kanpachi/response.rb', line 11

def representation
  @representation
end

#statusObject

Returns the value of attribute status.



10
11
12
# File 'lib/kanpachi/response.rb', line 10

def status
  @status
end