Class: NeuronCheckSystem::Plugin::KeywordAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/neuroncheck/plugin.rb

Overview

キーワードの処理内で使用可能なAPI

Instance Method Summary collapse

Constructor Details

#initialize(declared_caller_locations, method_self_object = nil) ⇒ KeywordAPI

Returns a new instance of KeywordAPI.



113
114
115
116
# File 'lib/neuroncheck/plugin.rb', line 113

def initialize(declared_caller_locations, method_self_object = nil)
  @declared_caller_locations = declared_caller_locations
  @method_self_object = method_self_object
end

Instance Method Details

#expected_value_match?(value, expected_value) ⇒ Boolean

Returns:

  • (Boolean)


122
123
124
# File 'lib/neuroncheck/plugin.rb', line 122

def expected_value_match?(value, expected_value)
  get_appropriate_matcher(expected_value).match?(value, @method_self_object)
end

#get_appropriate_matcher(expected_value) ⇒ Object



118
119
120
# File 'lib/neuroncheck/plugin.rb', line 118

def get_appropriate_matcher(expected_value)
  NeuronCheckSystem.get_appropriate_matcher(expected_value, @declared_caller_locations)
end

#get_expected_value_caption(expected_value) ⇒ Object



126
127
128
129
# File 'lib/neuroncheck/plugin.rb', line 126

def get_expected_value_caption(expected_value)
  get_appropriate_matcher(expected_value).expected_caption

end

#get_expected_value_meta_info_as_json(expected_value) ⇒ Object



136
137
138
139
# File 'lib/neuroncheck/plugin.rb', line 136

def get_expected_value_meta_info_as_json(expected_value)
  get_appropriate_matcher(expected_value).meta_info_as_json

end

#get_expected_value_short_caption(expected_value) ⇒ Object



131
132
133
134
# File 'lib/neuroncheck/plugin.rb', line 131

def get_expected_value_short_caption(expected_value)
  get_appropriate_matcher(expected_value).expected_short_caption

end