Sha256: 527481439b678836d62e09fbc71daf0a5b943c2574b36114f17d17de6cb33e86
Contents?: true
Size: 764 Bytes
Versions: 14
Compression:
Stored size: 764 Bytes
Contents
class TicketAntecedent include Comparable def initialize(ticket_or_commit, kind, id) @ticket_or_commit = ticket_or_commit @kind = kind @id = id end attr_reader :ticket_or_commit, :kind, :id delegate :project, to: :ticket_or_commit def self.from_s(ticket, string) new ticket, *string.split(":") end def to_s "#{kind}:#{id}" end def <=>(other) [kind, id] <=> [other.kind, other.id] end def released!(release=nil) Houston.observer.fire "antecedent:#{kind.downcase.underscore}:released", self end def resolve! Houston.observer.fire "antecedent:#{kind.downcase.underscore}:resolved", self end def close! Houston.observer.fire "antecedent:#{kind.downcase.underscore}:closed", self end end
Version data entries
14 entries across 14 versions & 1 rubygems