Class: SimpleInjector::Injectable
- Inherits:
-
Object
- Object
- SimpleInjector::Injectable
- Defined in:
- lib/simple_injector/injectable.rb
Overview
Class to handle instances to are injectable
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, callback) ⇒ Injectable
constructor
A new instance of Injectable.
Constructor Details
#initialize(name, callback) ⇒ Injectable
Returns a new instance of Injectable.
8 9 10 11 |
# File 'lib/simple_injector/injectable.rb', line 8 def initialize(name, callback) @name = name @callback = callback end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
6 7 8 |
# File 'lib/simple_injector/injectable.rb', line 6 def callback @callback end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/simple_injector/injectable.rb', line 6 def name @name end |