Sha256: 54b1b5d3cbb0d6e6c633f89fb05c96f72086818866afed1a79d90c8a28a8036a
Contents?: true
Size: 719 Bytes
Versions: 2
Compression:
Stored size: 719 Bytes
Contents
# Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. # require 'ramaze/tool/tidy' # require 'ramaze/tool/localize' module Ramaze module Dispatcher class Action # The response is passed to each filter by sending .call(response) to it. trait :filter => [ # Ramaze::Tool::Localize, # Ramaze::Tool::Tidy ] class << self def process(path) body = Controller.handle(path) response = Dispatcher.build_response(body) filter = ancestral_trait[:filter] filter.inject(response){|r,f| f.call(r) } end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.1.0 | lib/ramaze/dispatcher/action.rb |
ramaze-0.1.1 | lib/ramaze/dispatcher/action.rb |