module TrackRecordSections::GroupMixin

All the guts of a Group class inside a module, mostly for consistency of implementation compared with the Section and Sections classes.

Attributes

task[R]

Public Instance Methods

initialize_group( task ) click to toggle source

Initialize a group by passing in a non-nil Task instance.

# File lib/track_record_sections.rb, line 102
def initialize_group( task )
  @task = task
end
title() click to toggle source

Returns the group title, in plain text.

# File lib/track_record_sections.rb, line 108
def title
  this_group = nil
  task_title = @task.title || ''
  colon      = task_title.index( ':' )
  this_group = task_title[ 0..( colon - 1 ) ] unless ( colon.nil? )

  return this_group
end