Class: Nem::Endpoint::Debug
- Inherits:
-
Base
- Object
- Base
- Nem::Endpoint::Debug
show all
- Defined in:
- lib/nem/endpoint/debug.rb
Defined Under Namespace
Classes: Connection
Instance Method Summary
collapse
Methods inherited from Base
#current_node, #initialize, #next_node!, #request, #request!
Instance Method Details
#connections(dir) ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/nem/endpoint/debug.rb', line 50
def connections(dir)
case dir.to_s
when /\Ain/ then connections_incoming
when /\Aout/ then connections_outgoing
else raise "direction should be :incoming or :outgoing. dir: #{dir}"
end
end
|
#connections_incoming ⇒ Object
#connections_outgoing ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/nem/endpoint/debug.rb', line 6
def time_syncronization
request!(:get, '/debug/time-synchronization') do |res|
res[:data].map do |sync|
Nem::Model::Timesync.new_from_timer(sync)
end
end
end
|
#timers ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/nem/endpoint/debug.rb', line 15
def timers
request!(:get, '/debug/timers') do |res|
res[:data].map do |timer|
Nem::Model::Timer.new_from_timer(timer)
end
end
end
|