module Spregen::Helpers
Constants
- ESTIMATE_POINTS_PATTERN
Public Instance Methods
file()
click to toggle source
# File lib/spregen/helpers.rb, line 6 def file @file ||= File.open("#{@source.name}-report-#{today}.md", "w") end
rprint(cards, buffer = "")
click to toggle source
# File lib/spregen/helpers.rb, line 10 def rprint(cards, buffer = "") return unless cards cards.each do |card| link = card.desc.split("\n").first || card.url card_name = remove_estimate_points(card.name) buffer << "\n" unless buffer.blank? buffer << " - [#{card_name}](#{link})" end buffer end
today()
click to toggle source
# File lib/spregen/helpers.rb, line 21 def today Time.now.strftime("%d-%m-%Y-%M%S") end
Private Instance Methods
remove_estimate_points(card_title)
click to toggle source
# File lib/spregen/helpers.rb, line 26 def remove_estimate_points(card_title) card_title.gsub(ESTIMATE_POINTS_PATTERN, '') end