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

Instance Method Summary collapse

Methods included from TokenizableOption

#tokenize

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



6
7
8
# File 'lib/textoken/options/modules/conditional_option.rb', line 6

def base
  @base
end

#findingsObject (readonly)

Returns the value of attribute findings.



6
7
8
# File 'lib/textoken/options/modules/conditional_option.rb', line 6

def findings
  @findings
end

#regexpsObject (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

#priorityObject



8
9
10
# File 'lib/textoken/options/modules/conditional_option.rb', line 8

def priority
  1
end