lib/scrum_board.rb in trollolo-0.1.1 vs lib/scrum_board.rb in trollolo-0.2.0
- old
+ new
@@ -1,17 +1,17 @@
class ScrumBoard
class DoneColumnNotFoundError < StandardError; end
class AcceptedColumnNotFoundError < StandardError; end
- def initialize(board_data, settings)
+ def initialize(board_data, settings = nil)
@settings = settings
@board_data = board_data
end
def columns
- @columns ||= @board_data["lists"].map{|x| Column.new(@board_data, x["id"])}
+ @columns ||= @board_data['lists'].map{|x| Column.new(@board_data, x['id'], @settings)}
end
def done_column
done_columns = columns.select{|c| c.name =~ @settings.done_column_name_regex }
if done_columns.empty?
@@ -136,10 +136,10 @@
def meta_cards
scrum_cards.select(&:meta_card?)
end
def id
- @board_data["id"]
+ @board_data['id']
end
def cards
@cards ||= columns.map(&:cards).flatten
end