Class: Kanpachi::Response
- Inherits:
-
Object
- Object
- Kanpachi::Response
- Defined in:
- lib/kanpachi/response.rb
Defined Under Namespace
Modules: Representation
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#representation ⇒ Object
Returns the value of attribute representation.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(name) ⇒ Response
constructor
A new instance of Response.
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
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
9 10 11 |
# File 'lib/kanpachi/response.rb', line 9 def headers @headers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/kanpachi/response.rb', line 8 def name @name end |
#representation ⇒ Object
Returns the value of attribute representation.
11 12 13 |
# File 'lib/kanpachi/response.rb', line 11 def representation @representation end |
#status ⇒ Object
Returns the value of attribute status.
10 11 12 |
# File 'lib/kanpachi/response.rb', line 10 def status @status end |