Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matcher: ) ⇒ void #initialize(matcher: , block_expectation_value: ) ⇒ void

Returns a new instance of Base.

Overloads:



39
40
41
42
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 39

def initialize(matcher:, block_expectation_value: nil)
  @matcher = matcher
  @block_expectation_value = block_expectation_value
end

Instance Attribute Details

#block_expectation_valueObject (readonly)

Returns the value of attribute block_expectation_value.



20
21
22
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 20

def block_expectation_value
  @block_expectation_value
end

#matcherObject (readonly)

Returns the value of attribute matcher.



26
27
28
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 26

def matcher
  @matcher
end

Instance Method Details

#apply_stubs!void

This method returns an undefined value.



47
48
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 47

def apply_stubs!
end

#does_not_match?(block_expectation_value) ⇒ Boolean

Parameters:

  • block_expectation_value (Object)

    Can be any type.

Returns:

  • (Boolean)


64
65
66
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 64

def does_not_match?(block_expectation_value)
  !matches?(block_expectation_value)
end

#failure_messageString

Returns:

  • (String)


71
72
73
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 71

def failure_message
  ""
end

#failure_message_when_negatedString

Returns:

  • (String)


78
79
80
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 78

def failure_message_when_negated
  ""
end

#matches?(block_expectation_value) ⇒ Boolean

Parameters:

  • block_expectation_value (Object)

    Can be any type.

Returns:

  • (Boolean)


54
55
56
57
58
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 54

def matches?(block_expectation_value)
  @block_expectation_value = block_expectation_value

  false
end