Module: Eson::Search::Filter

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, arg) ⇒ Object



23
24
25
26
# File 'lib/eson/search/filter.rb', line 23

def method_missing(name, arg)
  warn("#{name} called as a filter option")
  self.options[name] = arg
end

Class Method Details

.included(base) ⇒ Object



16
17
18
19
20
21
# File 'lib/eson/search/filter.rb', line 16

def self.included(base)
  base.class_eval do
    extend ClassMethods
    include Node unless base.kind_of? Node
  end
end