Class: Picky::Tokenizer::RegexpWrapper
- Defined in:
- lib/picky/tokenizer/regexp_wrapper.rb
Instance Method Summary collapse
-
#initialize(regexp) ⇒ RegexpWrapper
constructor
A new instance of RegexpWrapper.
- #method_missing(name, *args, &block) ⇒ Object
- #source ⇒ Object
- #split(text) ⇒ Object
Constructor Details
#initialize(regexp) ⇒ RegexpWrapper
Returns a new instance of RegexpWrapper.
7 8 9 10 |
# File 'lib/picky/tokenizer/regexp_wrapper.rb', line 7 def initialize regexp @regexp = regexp @splitter = Splitter.new @regexp end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
20 21 22 |
# File 'lib/picky/tokenizer/regexp_wrapper.rb', line 20 def method_missing name, *args, &block @regexp.send name, *args, &block end |