Class: Ronin::OpenPort
- Inherits:
-
Object
- Object
- Ronin::OpenPort
- Includes:
- DataMapper::Timestamps, Model
- Defined in:
- lib/ronin/open_port.rb
Overview
Represents a open port at a specified IP address.
Instance Method Summary collapse
-
#address ⇒ String
The IP Address of the open port.
-
#number ⇒ Integer
The port number.
-
#to_i ⇒ Integer
Converts the open port to an integer.
-
#to_s ⇒ String
Converts the open port to a string.
Methods included from Model
Instance Method Details
#address ⇒ String
The IP Address of the open port.
68 69 70 |
# File 'lib/ronin/open_port.rb', line 68 def address self.ip_address.address end |
#number ⇒ Integer
The port number.
82 83 84 |
# File 'lib/ronin/open_port.rb', line 82 def number self.port.number end |
#to_i ⇒ Integer
Converts the open port to an integer.
96 97 98 |
# File 'lib/ronin/open_port.rb', line 96 def to_i self.port.to_i end |
#to_s ⇒ String
Converts the open port to a string.
110 111 112 113 114 115 116 |
# File 'lib/ronin/open_port.rb', line 110 def to_s if self.service "#{self.port} (#{self.service})" else self.port.to_s end end |