Class: NeuronCheckSystem::KindOfMatcher

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

Overview

値が指定されたClass / Moduleに所属していることを判定する (kind_of?判定)

Instance Attribute Summary

Attributes inherited from MatcherBase

#declared_caller_locations

Instance Method Summary collapse

Methods inherited from MatcherBase

#expected_short_caption, #get_error_message, #initialize

Constructor Details

This class inherits a constructor from NeuronCheckSystem::MatcherBase

Instance Method Details

#expected_captionObject



121
122
123
# File 'lib/neuroncheck/matcher.rb', line 121

def expected_caption
  @expected.name
end

#match?(value, self_object) ⇒ Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/neuroncheck/matcher.rb', line 117

def match?(value, self_object)
  value.kind_of?(@expected)
end

#meta_info_as_jsonObject



125
126
127
# File 'lib/neuroncheck/matcher.rb', line 125

def meta_info_as_json
  super.update('expected' => @expected.name)
end