Class: Amass::Hostname
- Inherits:
-
Object
- Object
- Amass::Hostname
- Defined in:
- lib/amass/hostname.rb
Overview
A hostname.
Instance Attribute Summary collapse
-
#addresses ⇒ Array<Address>
readonly
The addresses associated with the hostname.
-
#domain ⇒ String?
readonly
The domain the hostname belongs to.
-
#name ⇒ String
readonly
The hostname.
-
#sources ⇒ Array<String>
readonly
The source(s) that discovered the hostname.
-
#tag ⇒ String?
readonly
The tag from
amass
.
Instance Method Summary collapse
-
#initialize(name:, domain: nil, addresses: [], tag: nil, sources: []) ⇒ Hostname
constructor
Initializes the hostname.
-
#to_s ⇒ String
Converts the hostname to a String.
Constructor Details
#initialize(name:, domain: nil, addresses: [], tag: nil, sources: []) ⇒ Hostname
Initializes the hostname.
54 55 56 57 58 59 60 |
# 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 |
Instance Attribute Details
#addresses ⇒ Array<Address> (readonly)
The addresses associated with the hostname.
24 25 26 |
# File 'lib/amass/hostname.rb', line 24 def addresses @addresses end |
#domain ⇒ String? (readonly)
The domain the hostname belongs to.
19 20 21 |
# File 'lib/amass/hostname.rb', line 19 def domain @domain end |
#name ⇒ String (readonly)
The hostname.
14 15 16 |
# File 'lib/amass/hostname.rb', line 14 def name @name end |
#sources ⇒ Array<String> (readonly)
The source(s) that discovered the hostname.
34 35 36 |
# File 'lib/amass/hostname.rb', line 34 def sources @sources end |
#tag ⇒ String? (readonly)
The tag from amass
.
29 30 31 |
# File 'lib/amass/hostname.rb', line 29 def tag @tag end |
Instance Method Details
#to_s ⇒ String
Converts the hostname to a String.
68 69 70 |
# File 'lib/amass/hostname.rb', line 68 def to_s @name end |