typed-matcher 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,12 @@
1
1
  module Typed
2
2
  class Group
3
3
 
4
- def initialize
4
+ def initialize(hsh={})
5
5
  @types = Hash.new {|h,k| h[k]=[]}
6
+
7
+ hsh.each do |type,regexes|
8
+ register type, *regexes
9
+ end
6
10
  end
7
11
 
8
12
  def register type, *regexs
@@ -1,3 +1,3 @@
1
1
  module Typed
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typed-matcher
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tal Atlas