class Amass::Hostname

A hostname.

@api public

Attributes

addresses[R]

The addresses associated with the hostname.

@return [Array<Address>]

domain[R]

The domain the hostname belongs to.

@return [String, nil]

name[R]

The hostname.

@return [String]

sources[R]

The source(s) that discovered the hostname.

@return [Array<String>]

tag[R]

The tag from ‘amass`.

@return [String, nil]

Public Class Methods

new(name: , domain: nil, addresses: [], tag: nil, sources: []) click to toggle source

Initializes the hostname.

@param [String] name

The hostname.

@param [String, nil] domain

The domain the hostname belongs to.

@param [Array<Address>] addresses

The addresses associated with the hostname.

@param [String, nil] tag

The `amass` tag.

@param [Array<String>] sources

The source(s) that discovered the hostname.
# File lib/amass/hostname.rb, line 54
def initialize(name: , domain: nil, addresses: [], tag: nil, sources: [])
  @name      = name
  @domain    = domain
  @addresses = addresses
  @tag       = tag
  @sources   = sources
end

Public Instance Methods

to_s() click to toggle source

Converts the hostname to a String.

@return [String]

The hostname.
# File lib/amass/hostname.rb, line 68
def to_s
  @name
end