Module: QueryDelegator::RespondOrNone
- Defined in:
- lib/query_delegator/respond_or_none.rb
Instance Method Summary collapse
-
#respond_to(method_name, *args, &blk) ⇒ Object
Invokes a public method, otherwise returns
nonewhen method is unrecognized.
Instance Method Details
#respond_to(method_name, *args, &blk) ⇒ Object
Invokes a public method, otherwise returns none when method is unrecognized
5 6 7 8 9 |
# File 'lib/query_delegator/respond_or_none.rb', line 5 def respond_to(method_name, *args, &blk) return none unless respond_to?(method_name) public_send(method_name, *args, &blk) end |