类: RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator 私有

继承
Object
  • Object
显示全部
定义于
lib/rspec/matchers/built_in/compound.rb

概述

此类是私有 API 的一部分。 应尽可能避免使用此类,因为它可能会在未来被移除或更改。

对于值期望,我们可以按顺序评估匹配器。

实例方法摘要 折叠

构造函数详情

#initialize(actual) ⇒SequentialEvaluator

此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在未来被移除或更改。

返回一个新的 SequentialEvaluator 实例。

133
134
135
# File 'lib/rspec/matchers/built_in/compound.rb', line 133
def initialize(actual, *)
  @actual = actual
end

实例方法详情

#matcher_matches?(matcher) ⇒Boolean

此方法是私有 API 的一部分。 应尽可能避免使用此方法,因为它可能会在未来被移除或更改。

返回值

  • (Boolean)
137
138
139
# File 'lib/rspec/matchers/built_in/compound.rb', line 137
def matcher_matches?(matcher)
  matcher.matches?(@actual)
end