Class: Rex::Socket::Host
Overview
A single host
Instance Attribute Summary collapse
-
#hostname ⇒ Object
Returns the value of attribute hostname.
Attributes inherited from Range
Instance Method Summary collapse
- #address ⇒ Object
-
#initialize(address, hostname = nil, options = {}) ⇒ Host
constructor
A new instance of Host.
Methods inherited from Range
Constructor Details
#initialize(address, hostname = nil, options = {}) ⇒ Host
Returns a new instance of Host.
543 544 545 546 547 548 549 550 551 |
# File 'lib/rex/socket/range_walker.rb', line 543 def initialize(address, hostname=nil, ={}) if address.is_a? String .merge!({ ipv6: Rex::Socket.is_ipv6?(address) }) if [:ipv6].nil? address = Rex::Socket.addr_atoi(address) end super(address, address, ) @hostname = hostname end |
Instance Attribute Details
#hostname ⇒ Object
Returns the value of attribute hostname.
541 542 543 |
# File 'lib/rex/socket/range_walker.rb', line 541 def hostname @hostname end |