module Spine::Actions::Filters

Public Instance Methods

after(method_name) click to toggle source
# File lib/spine/actions/filters.rb, line 8
def after(method_name)
  after_filters << method_name
end
after_filters() click to toggle source
# File lib/spine/actions/filters.rb, line 31
def after_filters
  @after_filters ||= []
end
after_filters_with_parents() click to toggle source
# File lib/spine/actions/filters.rb, line 35
def after_filters_with_parents
  if superclass.respond_to?(:after_filters_with_parents)
    after_filters + superclass.after_filters_with_parents
  else
    after_filters
  end
end
before(method_name) click to toggle source
# File lib/spine/actions/filters.rb, line 4
def before(method_name)
  before_filters << method_name
end
before_filters() click to toggle source
# File lib/spine/actions/filters.rb, line 19
def before_filters
  @before_filters ||= []
end
before_filters_with_parents() click to toggle source
# File lib/spine/actions/filters.rb, line 23
def before_filters_with_parents
  if superclass.respond_to?(:before_filters_with_parents)
    superclass.before_filters_with_parents + before_filters
  else
    before_filters
  end
end
process_filters(handler, filters) click to toggle source
# File lib/spine/actions/filters.rb, line 12
def process_filters(handler, filters)
  filters.detect do |name|
    handler.public_send(name) if handler.respond_to?(name)
    handler.responded?
  end
end