class Scorecard::AppliedBadge
Attributes
badge[RW]
user[RW]
Public Class Methods
new(identifier, user)
click to toggle source
# File lib/scorecard/applied_badge.rb, line 6 def initialize(identifier, user) @user = user @badge = Scorecard.badges.find identifier end
Public Instance Methods
count()
click to toggle source
# File lib/scorecard/applied_badge.rb, line 11 def count Scorecard::UserBadge.for(badge.identifier, user).count end
gameables()
click to toggle source
# File lib/scorecard/applied_badge.rb, line 15 def gameables Scorecard::UserBadge.for(badge.identifier, user).collect &:gameable end