Sha256: 25f52b4c291f25907bbc377d7ba13edf6767c426abd044f07d096d787bbb2609
Contents?: true
Size: 501 Bytes
Versions: 5
Compression:
Stored size: 501 Bytes
Contents
module Story # Returns the URL for the story at Pivotal Tracker. def story_url(story_id) "https://www.pivotaltracker.com/story/show/#{story_id}" end # Returns the ids of delivered stories found in the given text. def delivered_ids(text) delivered = text.scan(/\[Deliver(?:s|ed) (.*?)\]/).flatten # Handle multiple ids, i.e., '[Delivers #<id 1> #<id 2>]' delivered.inject([]) do |ids, element| ids.concat(element.scan(/[0-9]{8,}/).flatten) ids end end end
Version data entries
5 entries across 5 versions & 1 rubygems