Class: Proc
Instance Method Summary collapse
Instance Method Details
#try(*a, &b) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/pubnub.rb', line 40 def try(*a, &b) if a.empty? && block_given? yield self else __send__(*a, &b) end end |