Module: Fear::ExtractorApi
- Included in:
- Fear
- Defined in:
- lib/fear/extractor_api.rb
Instance Method Summary collapse
-
#[](pattern) ⇒ Extractor::Pattern
Allows to pattern match and extract matcher variables.
-
#register_extractor(*names, extractor) ⇒ Object
Register extractor for given class.
Instance Method Details
#[](pattern) ⇒ Extractor::Pattern
Note:
it is not intended to be used by itself, rather then with partial functions
Allows to pattern match and extract matcher variables
10 11 12 |
# File 'lib/fear/extractor_api.rb', line 10 def [](pattern) Extractor::Pattern.new(pattern) end |
#register_extractor(*names, extractor) ⇒ Object
Register extractor for given class
31 32 33 |
# File 'lib/fear/extractor_api.rb', line 31 def register_extractor(*args) Extractor.register_extractor(*args) end |