lib/kpm/coordinates.rb in kpm-0.7.2 vs lib/kpm/coordinates.rb in kpm-0.8.0
- old
+ new
@@ -1,11 +1,10 @@
-module KPM
+# frozen_string_literal: true
+module KPM
class Coordinates
-
class << self
-
def build_coordinates(coordinate_map)
group_id = coordinate_map[:group_id]
artifact_id = coordinate_map[:artifact_id]
packaging = coordinate_map[:packaging]
classifier = coordinate_map[:classifier]
@@ -24,17 +23,15 @@
def get_coordinate_map(entry)
parts = entry.split(':')
length = parts.size
if length == 3
- {:group_id => parts[0], :artifact_id => parts[1], :packaging => parts[2]}
+ { group_id: parts[0], artifact_id: parts[1], packaging: parts[2] }
elsif length == 4
- {:group_id => parts[0], :artifact_id => parts[1], :packaging => parts[2], :version => parts[3]}
+ { group_id: parts[0], artifact_id: parts[1], packaging: parts[2], version: parts[3] }
elsif length == 5
- {:group_id => parts[0], :artifact_id => parts[1], :packaging => parts[2], :classifier => parts[3], :version => parts[4]}
+ { group_id: parts[0], artifact_id: parts[1], packaging: parts[2], classifier: parts[3], version: parts[4] }
end
end
-
end
-
end
-end
\ No newline at end of file
+end