Class: Spandx::Dotnet::PackageReference
- Inherits:
-
Object
- Object
- Spandx::Dotnet::PackageReference
- Defined in:
- lib/spandx/dotnet/package_reference.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name:, version:) ⇒ PackageReference
constructor
A new instance of PackageReference.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, version:) ⇒ PackageReference
Returns a new instance of PackageReference.
8 9 10 11 |
# File 'lib/spandx/dotnet/package_reference.rb', line 8 def initialize(name:, version:) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/spandx/dotnet/package_reference.rb', line 6 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/spandx/dotnet/package_reference.rb', line 6 def version @version end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'lib/spandx/dotnet/package_reference.rb', line 13 def to_h { name: name, version: version } end |