Method: HaveAPI::Client::Client#method_missing
- Defined in:
- lib/haveapi/client/client.rb
#method_missing(symbol, *args) ⇒ Object
Initialize the client if it is not yet initialized and call the resource if it exists.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/haveapi/client/client.rb', line 59 def method_missing(symbol, *args) return super(symbol, *args) if @setup setup_api if @resources.include?(symbol) method(symbol).call(*args) else super(symbol, *args) end end |