class Hubbah::Middleware
Public Class Methods
new(app, &block)
click to toggle source
Calls superclass method
# File lib/hubbah/middleware.rb, line 7 def initialize(app, &block) @app = app @configuration = Hubbah::Configuration.new(&block) super {} end
Public Instance Methods
call(env)
click to toggle source
# File lib/hubbah/middleware.rb, line 13 def call(env) env['hubbah'] = Hubbah::Payload.new(@configuration, env) to_app.call(env) end
Protected Instance Methods
encode(str)
click to toggle source
# File lib/hubbah/middleware.rb, line 19 def encode(str) URI.encode(str || '') end