class BestbuyApi::Model
Public Class Methods
attribute(id, columns = { search: false, read: true })
click to toggle source
# File lib/bestbuy_api/model.rb, line 13 def self.attribute(id, columns = { search: false, read: true }) row = { id => columns } attributes[:read].merge!(row) unless columns[:read] == false attributes[:search].merge!(row) unless columns[:search] == false end
attributes()
click to toggle source
# File lib/bestbuy_api/model.rb, line 5 def self.attributes @attributes ||= { path: nil, read: {}, search: {} } end
limit(args)
click to toggle source
# File lib/bestbuy_api/model.rb, line 27 def self.limit(args) Criteria.new(self).limit(args) end
page(args)
click to toggle source
# File lib/bestbuy_api/model.rb, line 31 def self.page(args) Criteria.new(self).page(args) end
path(path = nil)
click to toggle source
# File lib/bestbuy_api/model.rb, line 9 def self.path(path = nil) attributes[:path] = path end
select(*args)
click to toggle source
# File lib/bestbuy_api/model.rb, line 19 def self.select(*args) Criteria.new(self).select(args.uniq) end
where(args)
click to toggle source
# File lib/bestbuy_api/model.rb, line 23 def self.where(args) Criteria.new(self).where(args) end