Class: RSpec::Mocks::NestedSpace

Inherits:
Space
  • Object
show all
Defined in:
lib/rspec/mocks/space.rb

Instance Attribute Summary

Attributes inherited from Space

#any_instance_mutex, #any_instance_recorders, #proxies, #proxy_mutex

Instance Method Summary (collapse)

Methods inherited from Space

#any_instance_proxy_for, #any_instance_recorder_for, #new_scope, #proxy_for, #register_constant_mutator, #reset_all, #verify_all

Constructor Details

- (NestedSpace) initialize(parent)



174
175
176
177
# File 'lib/rspec/mocks/space.rb', line 174

def initialize(parent)
  @parent = parent
  super()
end

Instance Method Details

- (Object) constant_mutator_for(name)



183
184
185
# File 'lib/rspec/mocks/space.rb', line 183

def constant_mutator_for(name)
  super || @parent.constant_mutator_for(name)
end

- (Object) proxies_of(klass)



179
180
181
# File 'lib/rspec/mocks/space.rb', line 179

def proxies_of(klass)
  super + @parent.proxies_of(klass)
end

- (Boolean) registered?(object)



187
188
189
# File 'lib/rspec/mocks/space.rb', line 187

def registered?(object)
  super || @parent.registered?(object)
end