module Runner::Ratings
Public Instance Methods
rated_down(factor=1)
click to toggle source
# File lib/Runner/ratings.rb, line 10 def rated_down(factor=1) if (@rating -= (15*factor)) < 0 @rating = 0 end @reviews += 1 puts "Unluckly! #{@name} got rated down and is now #{@rating}" end
rated_up(factor=1)
click to toggle source
# File lib/Runner/ratings.rb, line 4 def rated_up(factor=1) @rating += (15*factor) @reviews += 1 puts "Awesome! #{@name} got rated up and is now #{@rating}" end
strong?()
click to toggle source
# File lib/Runner/ratings.rb, line 18 def strong? rating > 79 end