11ac9461c2
This adds fulltext search for blog posts. Together with the render object this creates a new possibility to extend the blog.
20 lines
377 B
Ruby
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
|