Method: ActiveSupport::Tryable#try!
- Defined in:
- activesupport/lib/active_support/core_ext/object/try.rb
#try!(*args, &block) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'activesupport/lib/active_support/core_ext/object/try.rb', line 20 def try!(*args, &block) if args.empty? && block_given? if block.arity == 0 instance_eval(&block) else yield self end else public_send(*args, &block) end end |