# Only tested on latest HEAD
require 'rubygems'
require 'camping'
require 'filtering_camping'
Camping.goes :Filters
module Filters
include FilteringCamping
before :Index do
@hello = 2
end
before '/login' do
@world = 3
end
before :all do
@var = 1
end
module Controllers
class Index < R '/'
def get
(@hello == 2).to_s
end
end
class Login < R '/login'
def get
(@world == 4).to_s
end
end
class AnotherOne < R '/@'
def get
(@var == 1).to_s
end
end
end
endProject
filtering_camping
This is an plugin for the Ruby Camping framework, providing a filtering mechanism for controllers, i.e. the ability to specify code to be executed before and/or after a controller request.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Development
Dependencies
Project Readme