Module: Textoken::ConditionalOption
- Includes:
- TokenizableOption
- Included in:
- Exclude, Only, RegexpOption
- Defined in:
- lib/textoken/options/modules/conditional_option.rb
Overview
This module will be shared in options like, only and exclude
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#findings ⇒ Object
readonly
Returns the value of attribute findings.
-
#regexps ⇒ Object
readonly
Returns the value of attribute regexps.
Instance Method Summary collapse
Methods included from TokenizableOption
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
6 7 8 |
# File 'lib/textoken/options/modules/conditional_option.rb', line 6 def base @base end |
#findings ⇒ Object (readonly)
Returns the value of attribute findings.
6 7 8 |
# File 'lib/textoken/options/modules/conditional_option.rb', line 6 def findings @findings end |
#regexps ⇒ Object (readonly)
Returns the value of attribute regexps.
6 7 8 |
# File 'lib/textoken/options/modules/conditional_option.rb', line 6 def regexps @regexps end |
Instance Method Details
#initialize(values) ⇒ Object
12 13 14 15 |
# File 'lib/textoken/options/modules/conditional_option.rb', line 12 def initialize(values) @regexps = Searcher.new(values).regexps @findings = Findings.new end |
#priority ⇒ Object
8 9 10 |
# File 'lib/textoken/options/modules/conditional_option.rb', line 8 def priority 1 end |