lib/card.rb in trollolo-0.0.5 vs lib/card.rb in trollolo-0.0.6

- old
+ new

@@ -27,10 +27,14 @@ def init_data(board_data, card_id) @board_data = board_data @card_data = @board_data["cards"].select{|c| c["id"] == card_id}.first end + def as_json + JSON.pretty_generate(@card_data) + end + def estimated? name =~ ESTIMATED_REGEX end def story_points @@ -64,17 +68,31 @@ def card_labels @card_data["labels"] end + def checklists + checklists = [] + @card_data["checklists"].each do |checklist| + checklists.push(Checklist.new(checklist)) + end + checklists + end + def desc @card_data["desc"] end def extra? self.card_labels.any? do |label| label['name'].include?('BelowWaterline') || label['name'].include?('Under waterline') + end + end + + def unplanned? + self.card_labels.any? do |label| + label['name'].include?('Unplanned') end end def meta_card? name =~ SPRINT_NUMBER_REGEX