Class Raven::Artifact
In: lib/raven/repo_builder.rb
Parent: Object

Representation of a repository artifact. Mostly based on Maven with all the groupId and artifactId crap.

Methods

==   ===   eql?   hash   new   to_s   to_yaml_properties  

Attributes

artifactId  [R] 
groupId  [R] 
path  [R] 
server  [RW] 
versionId  [R] 

Public Class methods

[Source]

    # File lib/raven/repo_builder.rb, line 29
29:     def initialize(groupId, artifactId, versionId, path)
30:       @groupId, @artifactId, @versionId, @path = groupId, artifactId, versionId, path
31:     end

Public Instance methods

[Source]

    # File lib/raven/repo_builder.rb, line 37
37:     def ==(art) eql?(art); end

[Source]

    # File lib/raven/repo_builder.rb, line 38
38:     def ===(art) eql?(art); end

[Source]

    # File lib/raven/repo_builder.rb, line 39
39:     def eql?(art)
40:       false if art.class != Artifact
41:       art.groupId == @groupId && art.artifactId == @artifactId && art.versionId == @versionId
42:     end

[Source]

    # File lib/raven/repo_builder.rb, line 44
44:     def hash
45:       @groupId.hash ^ (@artifactId.hash << 1) ^ (@versionId.hash << 2)
46:     end

[Source]

    # File lib/raven/repo_builder.rb, line 48
48:     def to_s
49:       "#{artifactId} v#{versionId} (project #{groupId})"
50:     end

[Source]

    # File lib/raven/repo_builder.rb, line 33
33:     def to_yaml_properties
34:       %w{ @groupId @artifactId @versionId @path }
35:     end

[Validate]