Class: Amass::Address
- Inherits:
-
Object
- Object
- Amass::Address
- Defined in:
- lib/amass/address.rb
Overview
An address of a hostname.
Instance Attribute Summary collapse
-
#asn ⇒ Integer
readonly
The ASN number.
-
#cidr ⇒ String
readonly
The CIDR mask.
-
#desc ⇒ String
(also: #description)
readonly
The description of the address.
-
#ip ⇒ String
readonly
The IP v4 or v6 address.
Instance Method Summary collapse
-
#initialize(ip:, cidr:, asn:, desc:) ⇒ Address
constructor
Initializes the address.
-
#to_s ⇒ String
Converts the address to a String.
Constructor Details
#initialize(ip:, cidr:, asn:, desc:) ⇒ Address
Initializes the address.
46 47 48 49 50 51 |
# File 'lib/amass/address.rb', line 46 def initialize(ip: , cidr: , asn: , desc: ) @ip = ip @cidr = cidr @asn = asn @desc = desc end |
Instance Attribute Details
#asn ⇒ Integer (readonly)
The ASN number.
22 23 24 |
# File 'lib/amass/address.rb', line 22 def asn @asn end |
#cidr ⇒ String (readonly)
The CIDR mask.
17 18 19 |
# File 'lib/amass/address.rb', line 17 def cidr @cidr end |
#desc ⇒ String (readonly) Also known as: description
The description of the address.
27 28 29 |
# File 'lib/amass/address.rb', line 27 def desc @desc end |
#ip ⇒ String (readonly)
The IP v4 or v6 address.
12 13 14 |
# File 'lib/amass/address.rb', line 12 def ip @ip end |
Instance Method Details
#to_s ⇒ String
Converts the address to a String.
59 60 61 |
# File 'lib/amass/address.rb', line 59 def to_s @ip end |