Class: Callme::Scopes::PrototypeScope
- Inherits:
-
Object
- Object
- Callme::Scopes::PrototypeScope
- Defined in:
- lib/callme/scopes/prototype_scope.rb
Overview
Prototype scope instantiates new dep instance on each get_dep
call
Instance Method Summary collapse
-
#delete_dep(dep_metadata) ⇒ Object
Delete dep from scope, because Prototype scope doesn’t store dep then do nothing here.
-
#get_dep(dep_metadata) ⇒ Object
Get new dep instance.
-
#initialize(dep_factory) ⇒ PrototypeScope
constructor
Constructon.
Constructor Details
#initialize(dep_factory) ⇒ PrototypeScope
Constructon
7 8 9 |
# File 'lib/callme/scopes/prototype_scope.rb', line 7 def initialize(dep_factory) @dep_factory = dep_factory end |
Instance Method Details
#delete_dep(dep_metadata) ⇒ Object
Delete dep from scope, because Prototype scope doesn’t store dep then do nothing here
23 24 |
# File 'lib/callme/scopes/prototype_scope.rb', line 23 def delete_dep() end |
#get_dep(dep_metadata) ⇒ Object
Get new dep instance
14 15 16 |
# File 'lib/callme/scopes/prototype_scope.rb', line 14 def get_dep() @dep_factory.create_dep_and_save(, {}) end |