Class: PVN::Matchers
- Inherits:
-
Object
- Object
- PVN::Matchers
- Includes:
- Loggable
- Defined in:
- lib/synoption/matchers.rb
Instance Attribute Summary collapse
-
#exact ⇒ Object
readonly
Returns the value of attribute exact.
-
#negative ⇒ Object
readonly
Returns the value of attribute negative.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Instance Method Summary collapse
-
#initialize(tag, name, negate, regexp) ⇒ Matchers
constructor
A new instance of Matchers.
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
#exact ⇒ Object (readonly)
Returns the value of attribute exact.
12 13 14 |
# File 'lib/synoption/matchers.rb', line 12 def exact @exact end |
#negative ⇒ Object (readonly)
Returns the value of attribute negative.
13 14 15 |
# File 'lib/synoption/matchers.rb', line 13 def negative @negative end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
14 15 16 |
# File 'lib/synoption/matchers.rb', line 14 def regexp @regexp end |