Class: NeuronCheckSystem::RegexpMatcher
- Inherits:
-
MatcherBase
- Object
- MatcherBase
- NeuronCheckSystem::RegexpMatcher
- Defined in:
- lib/neuroncheck/matcher.rb
Overview
指定した正規表現にマッチする文字列であることを判定する
Instance Attribute Summary
Attributes inherited from MatcherBase
Instance Method Summary collapse
Methods inherited from MatcherBase
#expected_short_caption, #get_error_message, #initialize, #meta_info_as_json
Constructor Details
This class inherits a constructor from NeuronCheckSystem::MatcherBase
Instance Method Details
#expected_caption ⇒ Object
148 149 150 |
# File 'lib/neuroncheck/matcher.rb', line 148 def expected_caption "String that matches with #{@expected.inspect}" end |
#match?(value, self_object) ⇒ Boolean
144 145 146 |
# File 'lib/neuroncheck/matcher.rb', line 144 def match?(value, self_object) (value.kind_of?(String) and @expected =~ value) end |