console_view_helper 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/console_view_helper.rb +6 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2I4ZWY4MmQ5NjIwYWI1NWJkZjUzZWJhMTE3OGM1YTk3NmJjN2QyMg==
4
+ ZjNlNDc2NzZlYTEzZThmYmEwZjg1YmFjYTM3OWY4MzY5NDU0MjQyNQ==
5
5
  data.tar.gz: !binary |-
6
- OWQ3NWU0ZGRjZDVkNzdiYjEzNmE3YmU3NTkwNDZiM2Q1MmU5ZWU0Zg==
6
+ YzNlOGU0Y2FhOWY5ZjBhNzVkYjY1NmM0ZDU2YmQxNTQxYmI2Y2U1Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmEwYjljOWZlZjUwZGRhOGU1NTU3NjNhNzk4Yzk2NTRkY2E3M2U4YjIwZTRl
10
- N2RiNDA0OGFhMDRlYTA1NWJiODAxNWY2ZGI5N2U1ZDk2YTUwMTI0OTI5YjM4
11
- NzEzYjQ5YmFhYWZkNzAzZTQzYjYyYTQ5ZmJiYmE3OTUwNWEyZjk=
9
+ ZDY2YjAwNTFkNGVmNTRhMjE5NjRmNzAyN2IzMzc5ZGVkYWYwMzgyODdmMjE3
10
+ NmFiYWNmMzYyOGIzMDk4ZTA2MzVkZjNiNjlhNWQxYjRjNWY3N2I2ZmQ4M2Zh
11
+ ZThlNmVjYTc4ODdhYTY2M2VmZTM4YmYxYTUyZmE1NTdlNWVhOGY=
12
12
  data.tar.gz: !binary |-
13
- MTZlZjdmZmUzNDM2OGJjZjZjZDRmZWMwZWI0NjIxOGJjN2U5OTMwY2NlOWE3
14
- YzNhYWY2NGUxYmIxYmI2MmE4NWE0MWUwNDY4N2VjYmZiM2Y4Y2JkZWEzYTBk
15
- ZWRkZWIxNjFmOTExNTIzODQ2MzU4ZGYwMDUwMDZjMTNhODIyZGQ=
13
+ MWE0MWEwYjdiNmI0MjI5MmIxNTkxZTYyNGVlYzVkMTc4ZWI0MmIzZDM4NWMw
14
+ MDg2MDkyODZkNzRjOGQzNjUyNTA4Y2Y4YmU5NmE3N2IyMzU0MDMyMjVhNDBj
15
+ MDJmZDQ3MjFmNzFlMjZjZTU3Yzc2ZGZmY2IxNzg5MTA5ZjhmYWU=
@@ -1,6 +1,7 @@
1
1
  # Encoding: utf-8
2
2
 
3
3
  # Requires
4
+ require 'rbconfig'
4
5
  require 'io/console'
5
6
  require 'colored'
6
7
 
@@ -45,6 +46,11 @@ module ConsoleViewHelper
45
46
  ' ' * n
46
47
  end
47
48
 
49
+ # Clear console screen
50
+ def cls
51
+ (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) ? system('cls') : system('clear')
52
+ end
53
+
48
54
  # Align text
49
55
  def align(text, size, direction = :left, append = ' ')
50
56
  case direction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console_view_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alfonso Mancilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-09 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored
@@ -27,7 +27,7 @@ dependencies:
27
27
  description: ! 'The console_view_helper library is used to build clean and beautiful
28
28
  console application interfaces.
29
29
 
30
- Customizable Components such as banners, tables, menus, lists, text inputs, hidden
30
+ Customizable components such as banners, tables, menus, lists, text inputs, hidden
31
31
  text inputs and
32
32
 
33
33
  methods as colorize, putsi, printi, align, explain, among others,