module HitList::RailsModelExtension::InstanceMethods

Public Instance Methods

hit_counter() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 43
def hit_counter
  @hit_counter ||= HitList::Counter.new(HitList::RailsModelExtension.redis_connection, self.class.name, hit_list_day_count)
end
hit_list_day_count() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 23
def hit_list_day_count
  7
end
increment_hit_counter!() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 31
def increment_hit_counter!
  hit_counter.hit!(self.id)
end
increment_only_rank!() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 39
def increment_only_rank!
  hit_counter.increment_rank!(self.id)
end
increment_only_total_hits!() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 35
def increment_only_total_hits!
  hit_counter.increment_total_hits!(self.id)
end
total_hits() click to toggle source
# File lib/hit_list/rails_model_extension.rb, line 27
def total_hits
  hit_counter.total_hits(self.id)
end