Class: Artifacts::Tag

Inherits:
YAML_Model
  • Object
show all
Defined in:
lib/artifacts/tag.rb

Constant Summary collapse

InvalidName =
Class.new( Exception )
VALID_NAME =
'[-a-z]+'

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



18
19
20
# File 'lib/artifacts/tag.rb', line 18

def <=>( other )
  self.name <=> other.name
end

#inspectObject



15
16
17
# File 'lib/artifacts/tag.rb', line 15

def inspect
  "#{to_s}: #{artifacts.map{|n|n.id}.join(',')}"
end

#to_sObject



12
13
14
# File 'lib/artifacts/tag.rb', line 12

def to_s
  name
end