ansiterm 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0df537615fddd8fe2fed0443af028139d1444979
4
- data.tar.gz: c5c72311de8e4022f7d8f951038f782ef8eadf57
3
+ metadata.gz: e87a8b37e0488b859cc89f8ebcc0ed199518d3fc
4
+ data.tar.gz: 738b1172d4ea87b8e4da9fc40eec476a5b0ba6a4
5
5
  SHA512:
6
- metadata.gz: e61b1784d2b29c07bca256043698320180542b7b1a44a3a3af5680e8eaa6c4ebf15bbf1a84cc620772b193e7321733a24d030df990684943b177b69e1fb09f82
7
- data.tar.gz: 6e1a7d0b76d5f7f11f85761fabddf6372294681d3f744fa4522d76fc30cab08bd27ce3426d3e01f780b1825135a4e876b1b3dd58e7bce31f67d7c97500b8420e
6
+ metadata.gz: e91d53b54b15a24a69944992c4da4882d2c17b549af25dab471c7b19ded12eeef36c986d2fd8f70f078cac64689aff72ec7a1071b0393cb4cad06b380e3a2f24
7
+ data.tar.gz: d6b17caf80f4e3a46d478a2d31dc3562817b7da6ed541ccec5fc44d44db7462d9fe34900070d0666da28766b98ca8a2237c8898d92d8043654b990c7bbf1c7ea
@@ -5,7 +5,7 @@ module AnsiTerm
5
5
  def initialize(str="")
6
6
  parse(str)
7
7
  end
8
-
8
+
9
9
  def to_str
10
10
  out = ""
11
11
  a = Attr.new
@@ -28,6 +28,10 @@ module AnsiTerm
28
28
  @str.length
29
29
  end
30
30
 
31
+ def index str, off = 0
32
+ @str.index(str,off)
33
+ end
34
+
31
35
  def set(str,attrs)
32
36
  @str, @attrs = str,Array(attrs)
33
37
  end
@@ -43,6 +47,12 @@ module AnsiTerm
43
47
  end
44
48
  end
45
49
 
50
+ def << str
51
+ str = self.class.new(str)
52
+ @str << str.raw
53
+ @attrs << str.attrs
54
+ # parse(self.to_str + "\e[0m" + str.to_str)
55
+ end
46
56
 
47
57
  private
48
58
 
@@ -1,3 +1,3 @@
1
1
  module AnsiTerm
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansiterm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vidar Hokstad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-31 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler