Module: Morpheus::Mixins::Filtering::ClassMethods

Defined in:
lib/morpheus/mixins/filtering.rb

Instance Method Summary collapse

Instance Method Details

#filter(name, &block) ⇒ Object



11
12
13
# File 'lib/morpheus/mixins/filtering.rb', line 11

def filter(name, &block)
  (@filters ||= []) << Filter.new(name, &block)
end

#find_filter(name) ⇒ Object



15
16
17
# File 'lib/morpheus/mixins/filtering.rb', line 15

def find_filter(name)
  (@filters ||= []).find { |filter| filter.name == name }
end