Module: Enumerize::Predicatable
- Included in:
- Set, Value
- Defined in:
- lib/enumerize/predicatable.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'lib/enumerize/predicatable.rb', line 3
def method_missing(method, *args, &block)
if boolean_method?(method)
define_query_methods
send(method, *args, &block)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
12
13
14
|
# File 'lib/enumerize/predicatable.rb', line 12
def respond_to_missing?(method, include_private=false)
boolean_method?(method)
end
|