module CoreExtensions::Object
Public Instance Methods
try(method)
click to toggle source
Simple shim that adds .try(:symbol) method for Object
, mimicing ActiveSupport one (probably poorly, todo: rewrite?)
# File lib/wowapi/core_extensions/object/try.rb, line 6 def try(method) begin self.send(method) rescue NoMethodError nil end end