class NoiteHoje::Resource

Public Class Methods

append_auth_token_to_params(*arguments) click to toggle source
# File lib/noitehoje/resource.rb, line 17
def append_auth_token_to_params(*arguments)
  opts = arguments.last.is_a?(Hash) ? arguments.pop : {}
  opts = opts.has_key?(:params) ? opts : opts.merge(:params => {}) 
  opts[:params] = opts[:params].merge(:auth_token => @@auth_token)
  arguments << opts
  arguments
end
find(*arguments) click to toggle source
Calls superclass method
# File lib/noitehoje/resource.rb, line 12
def find(*arguments)
  arguments = append_auth_token_to_params(*arguments)
  super(*arguments)
end