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 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
- clear_screen
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\n"
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
@@ -1,3 +1,3 @@
1
1
  module Ddtop
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: