Module: ObjectExtensions

Defined in:
app/extensions/object_extensions.rb

Instance Method Summary collapse

Instance Method Details

#try_all(*methods) ⇒ Object


2
3
4
5
6
7
# File 'app/extensions/object_extensions.rb', line 2

def try_all(*methods)
  methods.map(&:to_sym).each do |method|
    next unless respond_to?(method)
    return send(method)
  end
end