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.



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

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?



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

def body
  @body
end

#content_typeObject (readonly)

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



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

def content_type
  @content_type
end