Class: PVN::Matchers

Inherits:
Object
  • Object
show all
Includes:
Loggable
Defined in:
lib/synoption/matchers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tag, name, negate, regexp) ⇒ Matchers

Returns a new instance of Matchers.



16
17
18
19
20
# File 'lib/synoption/matchers.rb', line 16

def initialize tag, name, negate, regexp
  @exact = OptionExactMatch.new tag, name
  @negative = negate && OptionNegativeMatch.new(negate)
  @regexp = regexp && OptionRegexpMatch.new(regexp)
end

Instance Attribute Details

#exactObject (readonly)

Returns the value of attribute exact.



12
13
14
# File 'lib/synoption/matchers.rb', line 12

def exact
  @exact
end

#negativeObject (readonly)

Returns the value of attribute negative.



13
14
15
# File 'lib/synoption/matchers.rb', line 13

def negative
  @negative
end

#regexpObject (readonly)

Returns the value of attribute regexp.



14
15
16
# File 'lib/synoption/matchers.rb', line 14

def regexp
  @regexp
end