Class: QuartzTorrent::TrackerPeer

Inherits:
Object
  • Object
show all
Defined in:
lib/quartz_flow/mock_client.rb,
lib/quartz_flow/wrappers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



79
80
81
# File 'lib/quartz_flow/mock_client.rb', line 79

def id
  @id
end

#ipObject

Returns the value of attribute ip.



77
78
79
# File 'lib/quartz_flow/mock_client.rb', line 77

def ip
  @ip
end

#portObject

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_hObject



24
25
26
# File 'lib/quartz_flow/wrappers.rb', line 24

def to_h
  { ip: @ip, port: @port }
end