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
11
12
13
14
15
16
17
|
# File 'lib/enumerize/predicatable.rb', line 11
def method_missing(method, *args, &block)
if predicate_method?(method)
predicate_call(method[0..-2], *args, &block)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
5
6
7
|
# File 'lib/enumerize/predicatable.rb', line 5
def respond_to_missing?(method, include_private=false)
predicate_method?(method) || super
end
|