Sha256: 07e28c81caf35ca6ab74e4d125fd74c5e9f5d522d1af2daa0cc73bc845db3dee

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

module MTG
  class Resource
  
    # Get the hash of query parameters
    #
    # @return [Hash] query parameters
    def self.query
      @query ||= {:parameters => {}}
    end
  
    # Adds a parameter to the hash of query parameters
    #
    # @param args [Hash] the query parameter
    # @return [Resource] the Resource
    def self.where(args)
      query[:parameters].merge!(args)
      self
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mtg_sdk-1.0.1 lib/mtg_sdk/resource.rb
mtg_sdk-1.0.0 lib/mtg_sdk/resource.rb