Module: SearsApi::MethodMissingDeligation
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
66 67 68 69 70 |
# File 'lib/sears-api.rb', line 66 def method_missing(sym, *args, &block) res = Ick::Try.instance.invoke (deligate) {|x| x.send(sym, *args, &block)} res ||= Ick::Try.instance.invoke (deligate) {|x| x.send(ActiveSupport::Inflector.camelize(sym.to_s).to_sym, *args, &block) } res ||= super end |