Class: Roar::Rails::Responder::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/roar/rails/responder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, content_type) ⇒ Response

Returns a new instance of Response.



65
66
67
68
# File 'lib/roar/rails/responder.rb', line 65

def initialize(body, content_type)
  @body         = body
  @content_type = content_type
end

Instance Attribute Details

#bodyObject (readonly)

DISCUSS: how to add more header fields? #headers?



63
64
65
# File 'lib/roar/rails/responder.rb', line 63

def body
  @body
end

#content_typeObject (readonly)

DISCUSS: how to add more header fields? #headers?



63
64
65
# File 'lib/roar/rails/responder.rb', line 63

def content_type
  @content_type
end