Class: FlexMock::CallRecord

Inherits:
Struct
  • Object
show all
Defined in:
lib/flexmock/core.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



107
108
109
# File 'lib/flexmock/core.rb', line 107

def args
  @args
end

#block_givenObject

Returns the value of attribute block_given

Returns:

  • (Object)

    the current value of block_given



107
108
109
# File 'lib/flexmock/core.rb', line 107

def block_given
  @block_given
end

#expectationObject

Returns the value of attribute expectation

Returns:

  • (Object)

    the current value of expectation



107
108
109
# File 'lib/flexmock/core.rb', line 107

def expectation
  @expectation
end

#method_nameObject

Returns the value of attribute method_name

Returns:

  • (Object)

    the current value of method_name



107
108
109
# File 'lib/flexmock/core.rb', line 107

def method_name
  @method_name
end

Instance Method Details

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

Returns:

  • (Boolean)


108
109
110
111
112
# File 'lib/flexmock/core.rb', line 108

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