rr3 0.1.2 → 0.1.3

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: f88a6bc4a0d78aea6096a4032a238ba557c62440
4
- data.tar.gz: 8f6c0cddd83f63196cb7c0fd7bb2a102ceb6cce2
3
+ metadata.gz: 09c9b4e2826241dd132e4052017bda3c836dd673
4
+ data.tar.gz: 5fe026b9979e456c8716e3ea324efd6f66bf7936
5
5
  SHA512:
6
- metadata.gz: 733665e37388405a206c79a5a5fc5649907f4b0bd367dc77730511e9c60709f53c090cb45d35a6a7e11963711c4f28a78ee3773b8d2720802ec3ab9ea5726763
7
- data.tar.gz: 7d40fa398ca6f54e12f433db0ad7be096fe710ff2f493c68caf7a9107a42e09cbf03f0f6b6e2b57c72fb74a3208f4c156520493847081bdd9e6ad51c48e3e2ed
6
+ metadata.gz: b7fb22f0ada2ca36ca67c221fc9c7d70c51781049394d7576409ce4888784689f92a281a73e058a2964d8fa9d360905a95b09187848ef196874eed4cdf77ddd8
7
+ data.tar.gz: 1bb3d55047a453a86818675eedca10d421b9ed7c02659b7a97d9a9b3fe11acf26012c7269151cf4f357aad37b1ef387a8ca2a111893232d48f5d99a1021e09c5
data/README.md CHANGED
@@ -4,4 +4,15 @@
4
4
 
5
5
  ```
6
6
  $ gem install rr3
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```ruby
12
+ t = Rr3::Tree.new(10)
13
+ t.insert_path "/foo/bar"
14
+ t.compile!
15
+ t.match("/foo/bar") # => true
16
+ t.match("/foo/barr")) # => false
17
+ t.dump(0)
7
18
  ```
@@ -10,7 +10,7 @@ void init_tree(){
10
10
  cTree = rb_define_class_under(cRr3, "Tree", rb_cObject);
11
11
  rb_define_method(cTree, "initialize", initialize, 1);
12
12
  rb_define_method(cTree, "insert_path", insert_path, 1);
13
- rb_define_method(cTree, "compile", compile, 0);
13
+ rb_define_method(cTree, "compile!", compile, 0);
14
14
  rb_define_method(cTree, "match", match, 1);
15
15
  rb_define_method(cTree, "dump", dump, 1);
16
16
  }
@@ -1,3 +1,3 @@
1
1
  module Rr3
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -5,7 +5,7 @@ describe Rr3 do
5
5
  it 'works' do
6
6
  t = Rr3::Tree.new(10)
7
7
  t.insert_path "/foo/bar"
8
- t.compile
8
+ t.compile!
9
9
  expect(t.match("/foo/bar")).to be true
10
10
  expect(t.match("/foo/barr")).to be false
11
11
  t.dump(0)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rr3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Jian