class NeuronCheckSystem::KeywordPluginMatcher
プラグインで追加されたキーワード用
Public Class Methods
new(keyword, declared_caller_locations)
click to toggle source
# File lib/neuroncheck/matcher.rb, line 216 def initialize(keyword, declared_caller_locations) @keyword = keyword @declared_caller_locations = declared_caller_locations end
Public Instance Methods
expected_caption()
click to toggle source
# File lib/neuroncheck/matcher.rb, line 226 def expected_caption @keyword.api = Plugin::KeywordAPI.new(@declared_caller_locations) @keyword.expected_caption end
expected_short_caption()
click to toggle source
# File lib/neuroncheck/matcher.rb, line 231 def expected_short_caption @keyword.api = Plugin::KeywordAPI.new(@declared_caller_locations) @keyword.expected_short_caption end
keyword_name()
click to toggle source
# File lib/neuroncheck/matcher.rb, line 241 def keyword_name (@keyword.class).instance_variable_get(:@keyword_name).to_s end
match?(value, self_object)
click to toggle source
# File lib/neuroncheck/matcher.rb, line 221 def match?(value, self_object) @keyword.api = Plugin::KeywordAPI.new(@declared_caller_locations, self_object) @keyword.match?(value) end
meta_info_as_json()
click to toggle source
Calls superclass method
NeuronCheckSystem::MatcherBase#meta_info_as_json
# File lib/neuroncheck/matcher.rb, line 236 def meta_info_as_json @keyword.api = Plugin::KeywordAPI.new(@declared_caller_locations) super.update('keyword' => keyword_name, 'expected_caption' => expected_caption).tap{|x| x.delete('expected')}.update(@keyword.get_params_as_json) end