class Outrageous::StaticData::Base
Protected Class Methods
api_model(klass)
click to toggle source
# File lib/outrageous/static_data/base.rb, line 26 def self.api_model(klass) instance_eval <<-END def api_model '#{klass}' end END class_eval <<-END def api_model '#{klass}' end END end
Public Instance Methods
all(options = {})
click to toggle source
List elements
# File lib/outrageous/static_data/base.rb, line 16 def all(options = {}) get("/api/lol/static-data/#{region}/#{version || STATIC_DATA_VERSION}/#{self.class.api_model}", options) end
find(id, options = {})
click to toggle source
Show a specific element
# File lib/outrageous/static_data/base.rb, line 21 def find(id, options = {}) get("/api/lol/static-data/#{region}/#{version || STATIC_DATA_VERSION}/#{self.class.api_model}/#{id}", options) end