Class: Nmap::Address
- Inherits:
-
Struct
- Object
- Struct
- Nmap::Address
- Defined in:
- lib/nmap/address.rb
Overview
Represents an IP or MAC address and Vendor name.
Instance Attribute Summary collapse
-
#addr ⇒ Object
Returns the value of attribute addr.
-
#type ⇒ Object
Returns the value of attribute type.
-
#vendor ⇒ Object
Returns the value of attribute vendor.
Instance Method Summary collapse
-
#initialize(type, addr, vendor = nil) ⇒ Address
constructor
Initializes the address.
-
#to_s ⇒ String
Converts the address to a String.
Constructor Details
#initialize(type, addr, vendor = nil) ⇒ Address
Initializes the address.
19 20 21 |
# File 'lib/nmap/address.rb', line 19 def initialize(type,addr,vendor=nil) super(type,addr,vendor) end |
Instance Attribute Details
#addr ⇒ Object
Returns the value of attribute addr
5 6 7 |
# File 'lib/nmap/address.rb', line 5 def addr @addr end |
#type ⇒ Object
Returns the value of attribute type
5 6 7 |
# File 'lib/nmap/address.rb', line 5 def type @type end |
#vendor ⇒ Object
Returns the value of attribute vendor
5 6 7 |
# File 'lib/nmap/address.rb', line 5 def vendor @vendor end |
Instance Method Details
#to_s ⇒ String
Converts the address to a String.
29 30 31 |
# File 'lib/nmap/address.rb', line 29 def to_s self.addr.to_s end |