Class: Hooray::Port
- Inherits:
-
Struct
- Object
- Struct
- Hooray::Port
- Defined in:
- lib/hooray/port.rb
Overview
Socket Port
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/hooray/port.rb', line 5 def name @name end |
#number ⇒ Object
Returns the value of attribute number
5 6 7 |
# File 'lib/hooray/port.rb', line 5 def number @number end |
#protocol ⇒ Object
Returns the value of attribute protocol
5 6 7 |
# File 'lib/hooray/port.rb', line 5 def protocol @protocol end |
Instance Method Details
#<=>(other) ⇒ Object
10 11 12 |
# File 'lib/hooray/port.rb', line 10 def <=>(other) number <=> other.number end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/hooray/port.rb', line 14 def to_s "#{number}/#{protocol}" end |