Class: Ronin::DB::Software

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Model
Defined in:
lib/ronin/db/software.rb

Overview

Represents a Software product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

included

Instance Attribute Details

#idInteger

The primary key of the software.

Returns:

  • (Integer)


38
# File 'lib/ronin/db/software.rb', line 38

attribute :id, :integer

#nameString

The software's name.

Returns:

  • (String)


44
# File 'lib/ronin/db/software.rb', line 44

attribute :name, :string

#open_portsArray<OpenPort>

The open ports running the software

Returns:



66
# File 'lib/ronin/db/software.rb', line 66

has_many :open_ports

#vendorSoftwareVendor?

The vendor of the software

Returns:



59
60
# File 'lib/ronin/db/software.rb', line 59

belongs_to :vendor, optional:   true,
class_name: 'SoftwareVendor'

#versionString

The software's Version.

Returns:

  • (String)


51
# File 'lib/ronin/db/software.rb', line 51

attribute :version, :string

Instance Method Details

#to_sString

Converts the software to a String.

Returns:

  • (String)

    The software vendor, name and version.



76
77
78
# File 'lib/ronin/db/software.rb', line 76

def to_s
  [self.vendor, self.name, self.version].compact.join(' ')
end