module Gear::Filters::ClassMethods
Public Instance Methods
after(actions, &blk)
click to toggle source
# File lib/gear/filters.rb, line 16 def after(actions, &blk) actions = [actions] unless actions.is_a?(Array) actions.each do |action| filters[:after] << [action, blk] end end
before(actions, &blk)
click to toggle source
# File lib/gear/filters.rb, line 9 def before(actions, &blk) actions = [actions] unless actions.is_a?(Array) actions.each do |action| filters[:before] << [action, blk] end end
filters()
click to toggle source
# File lib/gear/filters.rb, line 5 def filters @_filters ||= {:before => [], :after => []} end