Sha256: 62c5422a5e5cf462894774be9c85b4e8957779118175822471aea002f8d979f1
Contents?: true
Size: 525 Bytes
Versions: 12
Compression:
Stored size: 525 Bytes
Contents
module PT::Flow class Branch require 'i18n' require 'active_support/core_ext/string/inflections' attr_accessor :name def self.current new(`git rev-parse --abbrev-ref HEAD`.strip) end def self.from_task(task) new("#{current.target}.#{task.name.parameterize[0..50]}.#{task.id}") end def initialize(name) @name = name end def target name.split('.').first end def task_id name[/\d+$/] || '' end def to_s name end end end
Version data entries
12 entries across 12 versions & 1 rubygems