Class: NeuronCheckSystem::SelfMatcher

Inherits:
MatcherBase show all
Defined in:
lib/neuroncheck/matcher.rb

Overview

selfであるかどうかを判定 (通常はreturns用)

Instance Attribute Summary

Attributes inherited from MatcherBase

#declared_caller_locations

Instance Method Summary collapse

Methods inherited from MatcherBase

#get_error_message, #meta_info_as_json

Constructor Details

#initialize(declared_caller_locations) ⇒ SelfMatcher

Returns a new instance of SelfMatcher.



198
199
200
# File 'lib/neuroncheck/matcher.rb', line 198

def initialize(declared_caller_locations)
  @declared_caller_locations = declared_caller_locations
end

Instance Method Details

#expected_captionObject



206
207
208
# File 'lib/neuroncheck/matcher.rb', line 206

def expected_caption
  "self"
end

#expected_short_captionObject



209
210
211
# File 'lib/neuroncheck/matcher.rb', line 209

def expected_short_caption
  "self"
end

#match?(value, self_object) ⇒ Boolean

Returns:

  • (Boolean)


202
203
204
# File 'lib/neuroncheck/matcher.rb', line 202

def match?(value, self_object)
  self_object.equal?(value)
end