Class: Ronin::Port
Overview
Represents a TCP or UDP port.
Instance Method Summary collapse
-
#inspect ⇒ String
Inspects the port.
-
#to_i ⇒ Integer
Converts the port to an integer.
-
#to_s ⇒ String
Converts the port to a string.
Methods included from Model
Instance Method Details
#inspect ⇒ String
Inspects the port.
88 89 90 |
# File 'lib/ronin/port.rb', line 88 def inspect "#<#{self.class}: #{self}>" end |
#to_i ⇒ Integer
Converts the port to an integer.
60 61 62 |
# File 'lib/ronin/port.rb', line 60 def to_i self.number.to_i end |
#to_s ⇒ String
Converts the port to a string.
74 75 76 |
# File 'lib/ronin/port.rb', line 74 def to_s "#{self.number}/#{self.protocol}" end |