Class: Blender::RSpec::StubRegistry
- Inherits:
-
Object
- Object
- Blender::RSpec::StubRegistry
- Includes:
- Singleton
- Defined in:
- lib/blender/rspec/stub_registry.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ StubRegistry
constructor
A new instance of StubRegistry.
Constructor Details
#initialize ⇒ StubRegistry
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
#data ⇒ Object (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 |