Class: LockJar::Domain::Jar

Inherits:
Artifact show all
Defined in:
lib/lock_jar/domain/artifact.rb

Instance Attribute Summary collapse

Attributes inherited from Artifact

#type

Instance Method Summary collapse

Methods inherited from Artifact

#<=>, #resolvable?

Constructor Details

#initialize(notation) ⇒ Jar

Returns a new instance of Jar.



44
45
46
47
# File 'lib/lock_jar/domain/artifact.rb', line 44

def initialize( notation )
  @type = 'jar'
  @notation = Naether::Notation.new( notation ).to_notation
end

Instance Attribute Details

#notationObject (readonly)

Returns the value of attribute notation.



42
43
44
# File 'lib/lock_jar/domain/artifact.rb', line 42

def notation
  @notation
end

Instance Method Details

#to_depObject



53
54
55
# File 'lib/lock_jar/domain/artifact.rb', line 53

def to_dep
  notation
end

#to_urnObject



49
50
51
# File 'lib/lock_jar/domain/artifact.rb', line 49

def to_urn
  "jar:#{notation}"
end