Class: Spandx::Dotnet::PackageReference

Inherits:
Object
  • Object
show all
Defined in:
lib/spandx/dotnet/package_reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/spandx/dotnet/package_reference.rb', line 6

def name
  @name
end

#versionObject (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_hObject



13
14
15
16
17
18
# File 'lib/spandx/dotnet/package_reference.rb', line 13

def to_h
  {
    name: name,
    version: version
  }
end