textweaver 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +7 -0
- data/README.txt +17 -8
- data/lib/text_weaver.rb +3 -0
- data/lib/text_weaver/version.rb +1 -1
- data/lib/textweaver.rb +1 -1
- metadata +5 -5
data/CHANGELOG.txt
CHANGED
data/README.txt
CHANGED
@@ -11,25 +11,34 @@ http://www.logilogi.org (http://foundation.logilogi.org).
|
|
11
11
|
|
12
12
|
== Usage
|
13
13
|
|
14
|
+
First require it.
|
15
|
+
|
16
|
+
$ irb
|
17
|
+
|
18
|
+
> require 'rubygems'
|
19
|
+
> require 'textweaver'
|
20
|
+
|
14
21
|
You can create a TextWeaver with any text.
|
15
22
|
|
16
|
-
w = TextWeaver.new("abcde")
|
23
|
+
> w = TextWeaver.new("abcde")
|
17
24
|
|
18
25
|
Then add some openings and closings.
|
19
26
|
|
20
|
-
w.add_opening(1, "(")
|
21
|
-
w.add_closing(4, ")")
|
27
|
+
> w.add_opening(1, "(")
|
28
|
+
> w.add_closing(4, ")")
|
22
29
|
|
23
|
-
w.weave
|
30
|
+
> w.weave
|
31
|
+
=> "a(bcd)e"
|
24
32
|
|
25
33
|
Possibly with additionally some different tag-types.
|
26
34
|
|
27
|
-
w.next_set
|
35
|
+
> w.next_set
|
28
36
|
|
29
|
-
w.add_opening(1, "<")
|
30
|
-
w.add_closing(4, ">")
|
37
|
+
> w.add_opening(1, "<")
|
38
|
+
> w.add_closing(4, ">")
|
31
39
|
|
32
|
-
w.weave
|
40
|
+
> w.weave
|
41
|
+
=> "a(<bcd>)e"
|
33
42
|
|
34
43
|
== Download
|
35
44
|
|
data/lib/text_weaver.rb
CHANGED
@@ -20,6 +20,9 @@
|
|
20
20
|
# You should only add stuff to the weaver via add_opening and
|
21
21
|
# add_closing.
|
22
22
|
|
23
|
+
$:.unshift(File.dirname(__FILE__)) unless
|
24
|
+
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
25
|
+
|
23
26
|
class TextWeaver
|
24
27
|
### Attributes
|
25
28
|
|
data/lib/text_weaver/version.rb
CHANGED
data/lib/textweaver.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require '
|
1
|
+
require 'text_weaver'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textweaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wybo Wiersma
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-31 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -27,12 +27,12 @@ files:
|
|
27
27
|
- README.txt
|
28
28
|
- CHANGELOG.txt
|
29
29
|
- LICENSE.txt
|
30
|
-
- lib/textweaver.rb
|
31
|
-
- lib/text_weaver.rb
|
32
30
|
- lib/text_weaver
|
31
|
+
- lib/text_weaver/version.rb
|
33
32
|
- lib/text_weaver/error.rb
|
34
33
|
- lib/text_weaver/insert_position.rb
|
35
|
-
- lib/
|
34
|
+
- lib/textweaver.rb
|
35
|
+
- lib/text_weaver.rb
|
36
36
|
- test/insert_position_test.rb
|
37
37
|
- test/text_weaver_test.rb
|
38
38
|
- test/test_helper.rb
|