0
0
zero-blog/lib/application.rb
Gibheer 11ac9461c2 add new helper and implement search
This adds fulltext search for blog posts. Together with the render
object this creates a new possibility to extend the blog.
2014-01-23 21:59:24 +01:00

20 lines
377 B
Ruby

class Application
def initialize(start, defaults = {})
@start = start
@defaults = defaults
end
def call(env)
session = Session.new(
::Zero::Request.new(env),
::Zero::Response.new,
Render.new(@defaults.clone)
)
worker = @start
while not worker.nil?
worker = worker.call(session)
end
session.response.to_a
end
end