Class: FlexMock::CallRecord

Inherits:
Struct
  • Object
show all
Defined in:
lib/flexmock/call_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



14
15
16
# File 'lib/flexmock/call_record.rb', line 14

def args
  @args
end

#block_givenObject

Returns the value of attribute block_given

Returns:

  • (Object)

    the current value of block_given



14
15
16
# File 'lib/flexmock/call_record.rb', line 14

def block_given
  @block_given
end

#expectationObject

Returns the value of attribute expectation

Returns:

  • (Object)

    the current value of expectation



14
15
16
# File 'lib/flexmock/call_record.rb', line 14

def expectation
  @expectation
end

#method_nameObject

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



14
15
16
# File 'lib/flexmock/call_record.rb', line 14

def method_name
  @method_name
end

Instance Method Details

#matches?(sym, actual_args, options) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
19
# File 'lib/flexmock/call_record.rb', line 15

def matches?(sym, actual_args, options)
  method_name == sym &&
    ArgumentMatching.all_match?(actual_args, args) &&
    matches_block?(options[:with_block])
end