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.



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

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

Instance Attribute Details

#notationObject (readonly)

Returns the value of attribute notation.



40
41
42
# File 'lib/lock_jar/domain/artifact.rb', line 40

def notation
  @notation
end

Instance Method Details

#to_depObject



51
52
53
# File 'lib/lock_jar/domain/artifact.rb', line 51

def to_dep
  notation
end

#to_urnObject



47
48
49
# File 'lib/lock_jar/domain/artifact.rb', line 47

def to_urn
  "jar:#{notation}"
end