Class: Actor::Messaging::Send::Substitute::Record

Inherits:
Struct
  • Object
show all
Defined in:
lib/actor/messaging/send/substitute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



31
32
33
# File 'lib/actor/messaging/send/substitute.rb', line 31

def address
  @address
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



31
32
33
# File 'lib/actor/messaging/send/substitute.rb', line 31

def message
  @message
end

#waitObject

Returns the value of attribute wait

Returns:

  • (Object)

    the current value of wait



31
32
33
# File 'lib/actor/messaging/send/substitute.rb', line 31

def wait
  @wait
end

Instance Method Details

#message?(pattern) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
35
36
37
38
# File 'lib/actor/messaging/send/substitute.rb', line 32

def message? pattern
  return true if message == pattern

  if pattern.is_a? Symbol and message.is_a? Message
    message.message_name == pattern
  end
end