Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/object/send.rb
Instance Method Summary collapse
-
#send?(method, *args, &block) ⇒ Boolean
Returns the result of
method, ornilifmethodis not a public method.
Instance Method Details
#send?(method, *args, &block) ⇒ Boolean
Returns the result of method, or nil if method is not a public method.
8 9 10 |
# File 'lib/object/send.rb', line 8 def send?(method, *args, &block) send(method, *args, &block) if respond_to? method end |