Class: RR::RecordedCall

Inherits:
Struct
  • Object
show all
Defined in:
lib/rr/recorded_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



2
3
4
# File 'lib/rr/recorded_call.rb', line 2

def arguments
  @arguments
end

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



2
3
4
# File 'lib/rr/recorded_call.rb', line 2

def block
  @block
end

#keyword_argumentsObject

Returns the value of attribute keyword_arguments

Returns:

  • (Object)

    the current value of keyword_arguments



2
3
4
# File 'lib/rr/recorded_call.rb', line 2

def keyword_arguments
  @keyword_arguments
end

#method_nameObject

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



2
3
4
# File 'lib/rr/recorded_call.rb', line 2

def method_name
  @method_name
end

#subjectObject

Returns the value of attribute subject

Returns:

  • (Object)

    the current value of subject



2
3
4
# File 'lib/rr/recorded_call.rb', line 2

def subject
  @subject
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/rr/recorded_call.rb', line 17

def ==(other)
  other.is_a?(self.class) &&
    subject == other.subject &&
    method_name == other.method_name &&
    arguments == other.arguments &&
    keyword_arguments == other.keyword_arguments
end

#inspectObject



7
8
9
10
11
12
13
14
15
# File 'lib/rr/recorded_call.rb', line 7

def inspect
  '[%s, %s, %s, %s, %s]' % [
    subject_to_s,
    method_name.inspect,
    arguments.inspect,
    keyword_arguments.inspect,
    block.inspect
  ]
end