ruby-zoom 3.3.3 → 3.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/string.rb +17 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcc735c6609a0afddcf0e3897ee184467df99b3e
4
- data.tar.gz: 914a9993a7d63133cb60defe2a410ea5e2e941cb
3
+ metadata.gz: a2fe0c7b9edfb4b70dd62eed194b898d5f643584
4
+ data.tar.gz: 3f3b1dae2223279ec40e6b63ad0c4ff2c87742a4
5
5
  SHA512:
6
- metadata.gz: 0cd0ae718c8af7f45812d0ce44bcefbc5e2871acbc9b3812d149097d41d4c6446d4840507b0b4a8b043133705ca8613b39953df16df5b24e5f67f48c6e31ff7c
7
- data.tar.gz: 5c19b7345ffef7fd49b13921c0c0550e4f77c74b004dc630ad54e121e59f1d7e63a0224e35b7282d26db4d3c077144a8cb4b58685079f9206eb57ea4c657a02c
6
+ metadata.gz: cb1bc59c381e3f2f33de4a4f2f20c81187a83c5c45ee332ac910dc4c9429b5b1cbbf7f619c3626a1cc1ef271304c087f431d95a0ca384761d0cb9cb1052aebb2
7
+ data.tar.gz: a833cb609d4eed8cafcb6b93f883f1c5527164a72bc6aa1c62368b5e0dea6d468be3507c9de12135e0da92cec093ce6036619536511e2f1eec1795f9377183b2
data/lib/string.rb CHANGED
@@ -1,17 +1,29 @@
1
1
  # Redefine String class to allow for colorizing, rsplit, and word wrap
2
2
  class String
3
+ def black
4
+ return colorize(30)
5
+ end
6
+
3
7
  def blue
4
- return colorize(36)
8
+ return colorize(34)
5
9
  end
6
10
 
7
11
  def colorize(color)
8
12
  return "\e[#{color}m#{self}\e[0m"
9
13
  end
10
14
 
15
+ def cyan
16
+ return colorise(36)
17
+ end
18
+
11
19
  def green
12
20
  return colorize(32)
13
21
  end
14
22
 
23
+ def purple
24
+ return colorize(35)
25
+ end
26
+
15
27
  def red
16
28
  return colorize(31)
17
29
  end
@@ -29,4 +41,8 @@ class String
29
41
  def word_wrap(width = 70)
30
42
  return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
31
43
  end
44
+
45
+ def yellow
46
+ return colorize(33)
47
+ end
32
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-zoom
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-03 00:00:00.000000000 Z
11
+ date: 2015-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest