lib/blinksale/rest_client.rb
# Returns a resource instance with the given options (of which :path is required).
# Instances are cached according to the :path and :filter options.
Returns a resource instance with the given options (of which :path is required).
Instances are cached according to the :path and :filter options.
Returns a resource instance with the given options ( of which : path is required ) . Instances are cached according to the : path and : filter options .
def resource(options = {})
      options = { :path => options } if options.is_a? String
      raise ArgumentError unless options[:path]
      options = { :client => self }.merge(options)
      query_string = Resource.query_string(options[:filter] || {})
      (@resources ||= {})[options[:path] + query_string] ||= Resource.new(options)
    end
def resource ( options = { } ) options = { :path => options } if options . is_a? String raise ArgumentError unless options [ :path ] options = { :client => self } . merge ( options ) query_string = Resource . query_string ( options [ :filter ] || { } ) ( @resources ||= { } ) [ options [ :path ] + query_string ] ||= Resource . new ( options ) end
Returns a resource instance with the given options (of which :path is required).
Returns a resource instance with the given options ( of which : path is required ) .
options