Class: Yarn::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResponse

Returns a new instance of Response.



7
8
9
# File 'lib/yarn/response.rb', line 7

def initialize
  @content = [nil, {}, []]      
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/yarn/response.rb', line 5

def content
  @content
end

Instance Method Details

#bodyObject



31
32
33
# File 'lib/yarn/response.rb', line 31

def body
  @content[2]
end

#body=(body) ⇒ Object



27
28
29
# File 'lib/yarn/response.rb', line 27

def body=(body)
  @content[2] = body
end

#headersObject



23
24
25
# File 'lib/yarn/response.rb', line 23

def headers
  @content[1]
end

#headers=(headers) ⇒ Object



19
20
21
# File 'lib/yarn/response.rb', line 19

def headers=(headers)
  @content[1] = headers
end

#statusObject



15
16
17
# File 'lib/yarn/response.rb', line 15

def status
  @content[0]
end

#status=(status) ⇒ Object



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

def status=(status)
  @content[0] = status
end

#to_sObject



35
36
37
# File 'lib/yarn/response.rb', line 35

def to_s
  @content
end