module QueryDelegator::RespondOrNone

Public Instance Methods

respond_to(method_name, *args, &blk) click to toggle source

Invokes a public method, otherwise returns none when method is unrecognized

# 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