Class: SteamCondenser::Community::GameAchievement::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/steam-condenser/community/game_achievement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(achievement, user, unlocked) ⇒ Instance


109
110
111
112
113
# File 'lib/steam-condenser/community/game_achievement.rb', line 109

def initialize(achievement, user, unlocked)
  @achievement = achievement
  @unlocked    = unlocked
  @user        = user
end

Instance Attribute Details

#achievementObject (readonly)

Returns the value of attribute achievement


105
106
107
# File 'lib/steam-condenser/community/game_achievement.rb', line 105

def achievement
  @achievement
end

#userObject (readonly)

Returns the value of attribute user


107
108
109
# File 'lib/steam-condenser/community/game_achievement.rb', line 107

def user
  @user
end

Instance Method Details

#inspectObject


115
116
117
# File 'lib/steam-condenser/community/game_achievement.rb', line 115

def inspect
  "#<#{self.class}: #{@achievement.api_name} unlocked=#@unlocked>"
end

#unlocked?Boolean

Returns whether this achievement has been unlocked by its owner


123
124
125
# File 'lib/steam-condenser/community/game_achievement.rb', line 123

def unlocked?
  @unlocked
end