class Crispy::CrispyReceivedMessageWithReceiver

Constants

CLASS_NAME
PP_CYCLE
PP_HEADER

Attributes

received_message[R]
receiver[R]

Public Class Methods

new(receiver, method_name, *arguments, &attached_block) click to toggle source
# File lib/crispy/crispy_received_message_with_receiver.rb, line 19
def initialize receiver, method_name, *arguments, &attached_block
  @received_message = CrispyReceivedMessage.new(method_name, *arguments, &attached_block)
  @receiver = receiver
end

Public Instance Methods

==(other) click to toggle source
# File lib/crispy/crispy_received_message_with_receiver.rb, line 24
def == other
  @receiver == other.receiver && @received_message == other.received_message
end
inspect()
Alias for: to_s
pretty_print(pp) click to toggle source
# File lib/crispy/crispy_received_message_with_receiver.rb, line 38
def pretty_print pp
  pp.group 2, PP_HEADER do
    pp.pp @receiver
    pp.text ','.freeze
    pp.breakable

    pp.pp @received_message.method_name
    pp.text ','.freeze
    pp.breakable

    pp.text '*'.freeze
    pp.pp @received_message.arguments
    pp.text ']>'.freeze
  end
end
pretty_print_cycle(pp) click to toggle source
# File lib/crispy/crispy_received_message_with_receiver.rb, line 56
def pretty_print_cycle pp
  pp.text PP_CYCLE
end
to_s() click to toggle source
# File lib/crispy/crispy_received_message_with_receiver.rb, line 30
def to_s
  "#<#{CLASS_NAME}[#{@receiver.inspect}, #{(@received_message.method_name).inspect}, *#{@received_message.arguments.inspect}]>"
end
Also aliased as: inspect