Class: Blender::RSpec::StubRegistry

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/blender/rspec/stub_registry.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStubRegistry

Returns a new instance of StubRegistry.



36
37
38
# File 'lib/blender/rspec/stub_registry.rb', line 36

def initialize
  @data = []
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



35
36
37
# File 'lib/blender/rspec/stub_registry.rb', line 35

def data
  @data
end

Class Method Details

.add(type, opts) ⇒ Object



40
41
42
43
44
# File 'lib/blender/rspec/stub_registry.rb', line 40

def self.add(type, opts)
  obj = SearchStub.new(type, opts)
  instance.data << obj
  obj
end