类: RSpec::Matchers::BuiltIn::YieldSuccessiveArgs 私有

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

概述

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

yield_successive_args 提供实现。不打算直接实例化。

常量摘要

BaseMatcher 继承的常量

BaseMatcher::UNDEFINED

实例方法摘要 折叠

BaseMatcher 继承的方法

#diffable?, #expects_call_stack_jump?, #match_unless_raises

Composable 包含的方法

#===, #and, #description_of, #or, should_enumerate?, surface_descriptions_in, unreadable_io?, #values_match?

构造函数详细信息

#initialize(*args) ⇒YieldSuccessiveArgs

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

返回 YieldSuccessiveArgs 的新实例。

297
298
299
# File 'lib/rspec/matchers/built_in/yield.rb', line 297
def initialize(*args)
  @expected = args
end

实例方法详细信息

#does_not_match?(block) ⇒Boolean

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

返回

  • (Boolean)
320
321
322
# File 'lib/rspec/matchers/built_in/yield.rb', line 320
def does_not_match?(block)
  !matches?(block) && @probe.has_block?
end