class XboxLiveApi::Game

Attributes

current_achievements[R]

@return [Fixnum] the number of achievements the user has unlocked for this game

current_gamerscore[R]

@return [Fixnum] the number of gamerscore the user has earned for this game

id[R]

@return [Fixnum] the unique Xbox Live id of the game

last_unlock_time[R]
name[R]

@return [Fixnum] the name of the game

platform[R]

@return [XboxLiveApi::Game::Platform::Xbox_360, XboxLiveApi::Game::Platform::Xbox_One]

total_gamerscore[R]

@return [Fixnum] the total number of gamerscore the user can earn for this game

Public Class Methods

new(name: nil, id: nil, last_unlock_time: nil, platform: nil, current_achievements: nil, current_gamerscore: nil, total_gamerscore: nil) click to toggle source
# File lib/xbox_live_api/game.rb, line 23
def initialize(name: nil, id: nil, last_unlock_time: nil, platform: nil, current_achievements: nil,
               current_gamerscore: nil, total_gamerscore: nil)
  @name = name
  @id = id
  @last_unlock_time = last_unlock_time
  @platform = platform
  @current_achievements = current_achievements
  @current_gamerscore = current_gamerscore
  @total_gamerscore = total_gamerscore
end

Public Instance Methods

==(o) click to toggle source
# File lib/xbox_live_api/game.rb, line 34
def ==(o)
  o.instance_of?(self.class) && o.state == state
end
hash() click to toggle source
# File lib/xbox_live_api/game.rb, line 38
def hash
  state.hash
end

Protected Instance Methods

state() click to toggle source
# File lib/xbox_live_api/game.rb, line 44
def state
  [@name, @id, @last_unlock_time, @platform, @current_achievements,
   @current_gamerscore, @total_gamerscore]
end