class Kingfisher::Controller

Attributes

env[R]

Public Class Methods

new(env) click to toggle source
# File lib/kingfisher/controller.rb, line 36
def initialize(env)
  @env = env
end

Private Instance Methods

params() click to toggle source
# File lib/kingfisher/controller.rb, line 55
def params
  request.params
end
redirect(path) click to toggle source
# File lib/kingfisher/controller.rb, line 59
def redirect(path)
  Redirect.new(path)
end
repo() click to toggle source
# File lib/kingfisher/controller.rb, line 51
def repo
  request.env.fetch("repo") { NullRepo.new }
end
request() click to toggle source
# File lib/kingfisher/controller.rb, line 43
def request
  @_request ||= Rack::Request.new(env)
end
view(view_class, locals: {}) click to toggle source
# File lib/kingfisher/controller.rb, line 47
def view(view_class, locals: {})
  view_class.new(request, locals: locals)
end