lib/picky/tokenizer/regexp_wrapper.rb in picky-4.18.0 vs lib/picky/tokenizer/regexp_wrapper.rb in picky-4.19.0
- old
+ new
@@ -1,19 +1,28 @@
-class RegexpWrapper
+module Picky
- def initialize regexp
- @regexp = regexp
- end
+ class Tokenizer
+
+ class RegexpWrapper
+
+ def initialize regexp
+ @regexp = regexp
+ @splitter = Splitter.new @regexp
+ end
- def split text
- text.split @regexp
- end
+ def split text
+ @splitter.multi text
+ end
- def source
- @regexp.source
- end
+ def source
+ @regexp.source
+ end
- def method_missing name, *args, &block
- @regexp.send name, *args, &block
- end
+ def method_missing name, *args, &block
+ @regexp.send name, *args, &block
+ end
+ end
+
+ end
+
end
\ No newline at end of file