class TimeTrello::ActivityRecord
Public: An activity record identifies completely an activity done in trello. Its main ideia is to be a standard record that can be compared, sorted and collected, used for reporting purposes.
Attributes
Public: Card Name
Public: Task duration
Public: This activity id. This is, actually, Trello's Action Identification.
Public: Task owner
Public: Project name (i.e., Trello board)
Public: Task start date
Public: Task comment
Public Class Methods
Public: Initializes this class with proper information about a given task
project - Project name (i.e., the board name) owner - Name of the duration owner start_date
- When the task started duration - The task duration
# File lib/time_trello/activity_record.rb, line 40 def initialize(*args) if args.size != 0 @id = args[0] @duration = args[1] @owner = args[2] @project = args[3] @start_date = args[4] @task_description = args[5] @card_name = args[6] end end
Public Instance Methods
Public: Implementation of Comparable mixin. The comparison is done following this attributes hierarchy:
-
project
-
owner
other - The other instance of ActivityRecord
to compare with.
# File lib/time_trello/activity_record.rb, line 59 def <=>(other) if other == nil return -1 end result = @project <=> other.project result = @owner <=> other.owner if result == 0 result = @start_date <=> other.start_date if result == 0 result end