Class: Maven::Model::Coordinate
- Includes:
- Tools::Coordinate
- Defined in:
- lib/maven/model/dependencies.rb
Direct Known Subclasses
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(*args) ⇒ Coordinate
constructor
A new instance of Coordinate.
- #version? ⇒ Boolean
Methods included from Tools::Coordinate
#gav, #group_artifact, #to_coordinate, #to_version
Methods inherited from Tag
#_name, _tags, #comment, prepend_tags, tags, #to_xml
Constructor Details
#initialize(*args) ⇒ Coordinate
Returns a new instance of Coordinate.
61 62 63 |
# File 'lib/maven/model/dependencies.rb', line 61 def initialize(*args) @group_id, @artifact_id, @version = gav(*args.flatten) end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
73 74 75 |
# File 'lib/maven/model/dependencies.rb', line 73 def ==(other) group_id == other.group_id && artifact_id == other.artifact_id end |
#hash ⇒ Object
69 70 71 |
# File 'lib/maven/model/dependencies.rb', line 69 def hash "#{group_id}:#{artifact_id}".hash end |
#version? ⇒ Boolean
65 66 67 |
# File 'lib/maven/model/dependencies.rb', line 65 def version? !(@version.nil? || @version == '[0,)') end |