class TPS::TaskList
The root node.
Attributes
sprints[RW]
tasks[RW]
trello_board_url[RW]
Public Class Methods
new(options)
click to toggle source
Calls superclass method
TPS::Task::new
# File lib/tps/task_list.rb, line 8 def initialize(options) super nil, nil, nil, nil data = if options[:yaml] YAML::load_file options[:yaml] elsif options[:taskpaper] TaskPaperShim.load options[:taskpaper] elsif options[:data] options[:data] else options end sprint_data = data.delete('Sprints') || {} @sprints = Hash[*sprint_data.map { |id, name| [id, Sprint.new(id, name, self)] }.flatten] @trello_board_url = data.delete('Trello URL') @tasks = data.map { |task, data| Task.new nil, task, data, self } end
Public Instance Methods
get_id()
click to toggle source
Returns a fresh ID. (internal)
# File lib/tps/task_list.rb, line 34 def get_id @task_count ||= 0 @task_count += 1 end
sprints?()
click to toggle source
# File lib/tps/task_list.rb, line 29 def sprints? sprints.any? end