Class: GreenGarden::ActivityTracker
- Inherits:
-
Struct
- Object
- Struct
- GreenGarden::ActivityTracker
- Defined in:
- lib/green_garden/models/activity_tracker.rb
Instance Attribute Summary collapse
-
#children_nodes ⇒ Object
Returns the value of attribute children_nodes.
-
#parent_nodes ⇒ Object
Returns the value of attribute parent_nodes.
-
#shifts ⇒ Object
Returns the value of attribute shifts.
Instance Method Summary collapse
-
#initialize ⇒ ActivityTracker
constructor
A new instance of ActivityTracker.
Constructor Details
#initialize ⇒ ActivityTracker
5 6 7 8 9 10 |
# File 'lib/green_garden/models/activity_tracker.rb', line 5 def initialize(*) super self.shifts ||= 0 self.parent_nodes ||= {} self.children_nodes ||= [] end |
Instance Attribute Details
#children_nodes ⇒ Object
Returns the value of attribute children_nodes
4 5 6 |
# File 'lib/green_garden/models/activity_tracker.rb', line 4 def children_nodes @children_nodes end |
#parent_nodes ⇒ Object
Returns the value of attribute parent_nodes
4 5 6 |
# File 'lib/green_garden/models/activity_tracker.rb', line 4 def parent_nodes @parent_nodes end |
#shifts ⇒ Object
Returns the value of attribute shifts
4 5 6 |
# File 'lib/green_garden/models/activity_tracker.rb', line 4 def shifts @shifts end |