Class: Tofu::Tofulet

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/tofu.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, bartender, *options) ⇒ Tofulet

Returns a new instance of Tofulet.



449
450
451
452
453
# File 'lib/tofu.rb', line 449

def initialize(config, bartender, *options)
  @bartender = bartender
  super(config, *options)
  @logger.debug("#{self.class}(initialize)")
end

Instance Attribute Details

#bartenderObject (readonly)

Returns the value of attribute bartender.



454
455
456
# File 'lib/tofu.rb', line 454

def bartender
  @bartender
end

#configObject (readonly)

Returns the value of attribute config.



454
455
456
# File 'lib/tofu.rb', line 454

def config
  @config
end

#loggerObject (readonly)

Returns the value of attribute logger.



454
455
456
# File 'lib/tofu.rb', line 454

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



454
455
456
# File 'lib/tofu.rb', line 454

def options
  @options
end

Instance Method Details

#service(req, res) ⇒ Object



456
457
458
# File 'lib/tofu.rb', line 456

def service(req, res)
  Context.new(req, res).service(@bartender)
end