Class: Rack::Logjam::Formatters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/logjam/formatters/base.rb

Direct Known Subclasses

Array, Empty, FormUrlencoded, Json, Nil, TextPlain, Xml

Instance Method Summary collapse

Constructor Details

#initialize(content, format = nil) ⇒ Base

Returns a new instance of Base.



6
7
8
9
# File 'lib/rack/logjam/formatters/base.rb', line 6

def initialize( content, format=nil )
  @content = content
  @format  = format
end

Instance Method Details

#renderObject



11
12
13
# File 'lib/rack/logjam/formatters/base.rb', line 11

def render
  "You must implement #{self.class.name}#render in order to render a #{format} response"
end