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



19
20
21
# File 'lib/actor/messaging/send/substitute.rb', line 19

def address
  @address
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



19
20
21
# File 'lib/actor/messaging/send/substitute.rb', line 19

def message
  @message
end

#waitObject

Returns the value of attribute wait

Returns:

  • (Object)

    the current value of wait



19
20
21
# File 'lib/actor/messaging/send/substitute.rb', line 19

def wait
  @wait
end

Instance Method Details

#message?(pattern) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
24
25
26
# File 'lib/actor/messaging/send/substitute.rb', line 20

def message? pattern
  return true if message == pattern

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