Class: Bootprint::Advisories::Advisory

Inherits:
Struct
  • Object
show all
Defined in:
lib/bootprint/advisories.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#affected_versionsObject

Returns the value of attribute affected_versions

Returns:

  • (Object)

    the current value of affected_versions



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def affected_versions
  @affected_versions
end

#cveObject

Returns the value of attribute cve

Returns:

  • (Object)

    the current value of cve



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def cve
  @cve
end

#gemObject

Returns the value of attribute gem

Returns:

  • (Object)

    the current value of gem



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def gem
  @gem
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def id
  @id
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def severity
  @severity
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def title
  @title
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



11
12
13
# File 'lib/bootprint/advisories.rb', line 11

def url
  @url
end

Instance Method Details

#to_hObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/bootprint/advisories.rb', line 12

def to_h
  {
    "id" => id,
    "gem" => gem,
    "title" => title,
    "severity" => severity,
    "affected_versions" => affected_versions,
    "url" => url,
    "cve" => cve
  }.compact
end