class RAWG::Game
Public Class Methods
new(options = {}) { |self| ... }
click to toggle source
# File lib/rawg/game.rb, line 13 def initialize(options = {}) @client = options[:client] || RAWG::Client.new assign_attributes(options) yield self if block_given? end
Public Instance Methods
from_api_response(response)
click to toggle source
# File lib/rawg/game.rb, line 19 def from_api_response(response) assign_attributes(response) self end
suggested(options)
click to toggle source
# File lib/rawg/game.rb, line 24 def suggested(options) response = client.game_suggest(@id, options) RAWG::Collection .new(RAWG::Game, client: client) .from_api_response(response) end