ddtop 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ddtop/ddtop.rb +8 -2
- data/lib/ddtop/version.rb +1 -1
- metadata +1 -1
data/lib/ddtop/ddtop.rb
CHANGED
@@ -10,6 +10,8 @@ class Ddtop::Ddtop
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def run
|
13
|
+
clear_screen
|
14
|
+
|
13
15
|
summary, fields = nil
|
14
16
|
values = []
|
15
17
|
|
@@ -48,7 +50,7 @@ class Ddtop::Ddtop
|
|
48
50
|
@win_rows = win_rows
|
49
51
|
@curr_row = 0
|
50
52
|
yield if block_given?
|
51
|
-
|
53
|
+
reset_cursor
|
52
54
|
end
|
53
55
|
|
54
56
|
@curr_row += 1
|
@@ -161,7 +163,11 @@ class Ddtop::Ddtop
|
|
161
163
|
end
|
162
164
|
|
163
165
|
def clear_screen
|
164
|
-
print "\e[2J
|
166
|
+
print "\e[2J"
|
167
|
+
end
|
168
|
+
|
169
|
+
def reset_cursor
|
170
|
+
print "\e[0;0H"
|
165
171
|
end
|
166
172
|
|
167
173
|
def expand_value(value)
|
data/lib/ddtop/version.rb
CHANGED