Class: UserStat

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/trophy_scraper/models/user_stat.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject



18
19
20
# File 'lib/trophy_scraper/models/user_stat.rb', line 18

def to_s
  return "percent_to_next_level = #{@percent_to_next_level}, level = #{@level}, #bronze = #{@number_of_bronze}, #silver = #{@number_of_silver}, #gold = #{@number_of_gold}, #platinum = #{@number_of_platinum}"
end

#total_trophiesObject



14
15
16
# File 'lib/trophy_scraper/models/user_stat.rb', line 14

def total_trophies
  return @number_of_bronze + @number_of_silver + @number_of_gold + @number_of_platinum
end