Class: Sequent::Core::Helpers::MessageMatchers::IsA

Inherits:
Struct
  • Object
show all
Includes:
ExceptOpt
Defined in:
lib/sequent/core/helpers/message_matchers/is_a.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expected_classObject

Returns the value of attribute expected_class

Returns:

  • (Object)

    the current value of expected_class



7
8
9
# File 'lib/sequent/core/helpers/message_matchers/is_a.rb', line 7

def expected_class
  @expected_class
end

#optsObject

Returns the value of attribute opts

Returns:

  • (Object)

    the current value of opts



7
8
9
# File 'lib/sequent/core/helpers/message_matchers/is_a.rb', line 7

def opts
  @opts
end

Instance Method Details

#matches_message?(message) ⇒ Boolean

Returns:



10
11
12
# File 'lib/sequent/core/helpers/message_matchers/is_a.rb', line 10

def matches_message?(message)
  message.is_a?(expected_class) unless excluded?(message)
end

#to_sObject



14
15
16
# File 'lib/sequent/core/helpers/message_matchers/is_a.rb', line 14

def to_s
  "is_a(#{matcher_arguments})"
end