Class: QuartzTorrent::TrackerPeer
- Inherits:
-
Object
- Object
- QuartzTorrent::TrackerPeer
- Defined in:
- lib/quartz_flow/mock_client.rb,
lib/quartz_flow/wrappers.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(ip, port, id = nil) ⇒ TrackerPeer
constructor
A new instance of TrackerPeer.
- #to_h ⇒ Object
Constructor Details
#initialize(ip, port, id = nil) ⇒ TrackerPeer
Returns a new instance of TrackerPeer.
71 72 73 74 75 |
# File 'lib/quartz_flow/mock_client.rb', line 71 def initialize(ip, port, id = nil) @ip = ip @port = port @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
79 80 81 |
# File 'lib/quartz_flow/mock_client.rb', line 79 def id @id end |
#ip ⇒ Object
Returns the value of attribute ip.
77 78 79 |
# File 'lib/quartz_flow/mock_client.rb', line 77 def ip @ip end |
#port ⇒ Object
Returns the value of attribute port.
78 79 80 |
# File 'lib/quartz_flow/mock_client.rb', line 78 def port @port end |
Instance Method Details
#to_h ⇒ Object
24 25 26 |
# File 'lib/quartz_flow/wrappers.rb', line 24 def to_h { ip: @ip, port: @port } end |