Class: Sequent::Core::Helpers::MessageMatchers::InstanceOf

Inherits:
Struct
  • Object
show all
Defined in:
lib/sequent/core/helpers/message_matchers/instance_of.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/instance_of.rb', line 7

def expected_class
  @expected_class
end

Instance Method Details

#matches_message?(message) ⇒ Boolean

Returns:



8
9
10
# File 'lib/sequent/core/helpers/message_matchers/instance_of.rb', line 8

def matches_message?(message)
  message.instance_of?(expected_class)
end

#to_sObject



12
13
14
# File 'lib/sequent/core/helpers/message_matchers/instance_of.rb', line 12

def to_s
  expected_class
end