Parent

Class/Module Index [+]

Quicksearch

RSpec::Mocks::DirectObjectReference

Used when an object is passed to `object_double`. Represents a reference to that object.

@private

Public Class Methods

new(object) click to toggle source
# File lib/rspec/mocks/object_reference.rb, line 28
def initialize(object)
  @object = object
end

Public Instance Methods

const_to_replace() click to toggle source
# File lib/rspec/mocks/object_reference.rb, line 36
def const_to_replace
  raise ArgumentError,
    "Can not perform constant replacement with an object."
end
defined?() click to toggle source
# File lib/rspec/mocks/object_reference.rb, line 41
def defined?
  true
end
description() click to toggle source
# File lib/rspec/mocks/object_reference.rb, line 32
def description
  @object.inspect
end
when_loaded() click to toggle source
# File lib/rspec/mocks/object_reference.rb, line 45
def when_loaded
  yield @object
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.