mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
18 lines
345 B
Ruby
18 lines
345 B
Ruby
|
|
module Stats
|
||
|
|
class Contexts
|
||
|
|
|
||
|
|
attr_reader :user
|
||
|
|
def initialize(user)
|
||
|
|
@user = user
|
||
|
|
end
|
||
|
|
|
||
|
|
def actions
|
||
|
|
@actions ||= Stats::TopContextsQuery.new(user, :limit => 5).result
|
||
|
|
end
|
||
|
|
|
||
|
|
def running_actions
|
||
|
|
@running_actions ||= Stats::TopContextsQuery.new(user, :limit => 5, :running => true).result
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|