lib/scrum_board.rb in trollolo-0.2.0 vs lib/scrum_board.rb in trollolo-0.3.0
- old
+ new
@@ -10,20 +10,31 @@
def columns
@columns ||= @board_data['lists'].map{|x| Column.new(@board_data, x['id'], @settings)}
end
+ def todo_columns
+ columns.select{|c| @settings.todo_columns.include?(c.name)}
+ end
+
+ def doing_columns
+ columns.select{|c| @settings.doing_columns.include?(c.name) }
+ end
+
def done_column
done_columns = columns.select{|c| c.name =~ @settings.done_column_name_regex }
if done_columns.empty?
raise DoneColumnNotFoundError, "can't find done column by name regex #{@settings.done_column_name_regex}"
else
done_columns.max_by{|c| c.name.match(@settings.done_column_name_regex).captures.first.to_i }
end
end
+ def accepted_columns
+ columns.select{|c| c.name =~ @settings.accepted_column_name_regex }
+ end
+
def accepted_column
- accepted_columns = columns.select{|c| c.name =~ @settings.accepted_column_name_regex }
if accepted_columns.empty?
EmptyColumn.new
else
accepted_columns.max_by{|c| c.name.match(@settings.accepted_column_name_regex).captures.first.to_i }
end