lib/card.rb in trollolo-0.0.10 vs lib/card.rb in trollolo-0.0.11
- old
+ new
@@ -69,15 +69,13 @@
def card_labels
@card_data["labels"]
end
def checklists
- checklists = []
- @card_data["checklists"].each do |checklist|
- checklists.push(Checklist.new(checklist))
+ @card_data["checklists"].map do |checklist|
+ Checklist.new(checklist)
end
- checklists
end
def desc
@card_data["desc"]
end
@@ -107,10 +105,10 @@
def fast_lane?
# TODO: move to settings
self.card_labels.map{|l| l['name']}.include?('FastLane')
end
- #TODO: rethink storage for meta data for sprint
+ # TODO: rethink storage for meta data for sprint
def self.parse_yaml_from_description(description)
description =~ /```(yaml)?\n(.*)```/m
yaml = $2
if yaml
return YAML.load(yaml) # throws an exception for invalid yaml