Module: OpenAssets::MethodFilter::Filters
- Defined in:
- lib/openassets/medhod_filter.rb
Instance Method Summary collapse
Instance Method Details
#before_filter(method, options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/openassets/medhod_filter.rb', line 6 def before_filter(method, = {}) @before_filters ||= {} @before_filters[method] = end |
#filtered_method?(method, options) ⇒ Boolean
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/openassets/medhod_filter.rb', line 11 def filtered_method?(method, ) if .has_key? :include return true if [:include].include? method.intern false elsif .has_key? :exclude return false if [:exclude].include? method.intern true else true end end |