类: RSpec::Matchers::BuiltIn::ChangeRelatively 私有

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

概述

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

用于指定相对变化。

常量摘要

BaseMatcher 继承的常量

BaseMatcher::UNDEFINED

实例方法摘要 收起

BaseMatcher 继承的方法

#diffable?, #expects_call_stack_jump?, #match_unless_raises

BaseMatcher::DefaultFailureMessages 包含的方法

#failure_message_when_negated

Composable 包含的方法

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

构造函数详情

#initialize(change_details, expected_delta, relativity, &comparer) ⇒ChangeRelatively

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

返回一个新的 ChangeRelatively 实例。

129
130
131
132
133
134
# File 'lib/rspec/matchers/built_in/change.rb', line 129
def initialize(change_details, expected_delta, relativity, &comparer)
  @change_details = change_details
  @expected_delta = expected_delta
  @relativity     = relativity
  @comparer       = comparer
end