Class: Maven::Model::Coordinate

Inherits:
Tag
  • Object
show all
Defined in:
lib/ruby/maven/model/dependencies.rb

Direct Known Subclasses

Dependency, Parent, Plugin, Project

Instance Method Summary collapse

Methods inherited from Tag

#_name, _tags, #comment, prepend_tags, tags, #to_xml

Constructor Details

#initialize(*args) ⇒ Coordinate

Returns a new instance of Coordinate.



31
32
33
# File 'lib/ruby/maven/model/dependencies.rb', line 31

def initialize(*args)
  @group_id, @artifact_id, @version = *coordinate(*args.flatten)
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



39
40
41
# File 'lib/ruby/maven/model/dependencies.rb', line 39

def ==(other)
  group_id == other.group_id && artifact_id == other.artifact_id
end

#hashObject



35
36
37
# File 'lib/ruby/maven/model/dependencies.rb', line 35

def hash
  "#{group_id}:#{artifact_id}".hash
end