lib/spandx/parsers/csproj/package_reference.rb in spandx-0.2.0 vs lib/spandx/parsers/csproj/package_reference.rb in spandx-0.3.0
- old
+ new
@@ -1,9 +1,23 @@
# frozen_string_literal: true
module Spandx
module Parsers
class Csproj
- PackageReference = Struct.new(:name, :version, keyword_init: true)
+ class PackageReference
+ attr_reader :name, :version
+
+ def initialize(name:, version:)
+ @name = name
+ @version = version
+ end
+
+ def to_h
+ {
+ name: name,
+ version: version
+ }
+ end
+ end
end
end
end