Class: Stats::Contexts
- Inherits:
-
Object
- Object
- Stats::Contexts
- Defined in:
- app/models/stats/contexts.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #actions ⇒ Object
-
#initialize(user) ⇒ Contexts
constructor
A new instance of Contexts.
- #running_actions ⇒ Object
Constructor Details
#initialize(user) ⇒ Contexts
Returns a new instance of Contexts.
5 6 7 |
# File 'app/models/stats/contexts.rb', line 5 def initialize(user) @user = user end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'app/models/stats/contexts.rb', line 3 def user @user end |
Instance Method Details
#actions ⇒ Object
9 10 11 |
# File 'app/models/stats/contexts.rb', line 9 def actions @actions ||= Stats::TopContextsQuery.new(user, :limit => 5).result end |
#running_actions ⇒ Object
13 14 15 |
# File 'app/models/stats/contexts.rb', line 13 def running_actions @running_actions ||= Stats::TopContextsQuery.new(user, :limit => 5, :running => true).result end |