Class: Encase::SingletonItem
- Inherits:
-
FactoryItem
- Object
- ContainerItem
- FactoryItem
- Encase::SingletonItem
- Defined in:
- lib/encase/singleton_item.rb
Instance Attribute Summary collapse
-
#singleton ⇒ Object
Returns the value of attribute singleton.
Attributes inherited from ContainerItem
#container, #key, #reified_value, #value
Instance Method Summary collapse
Methods inherited from ContainerItem
#initialize, #inject, #instance, #reified?, #reify, #store
Constructor Details
This class inherits a constructor from Encase::ContainerItem
Instance Attribute Details
#singleton ⇒ Object
Returns the value of attribute singleton.
5 6 7 |
# File 'lib/encase/singleton_item.rb', line 5 def singleton @singleton end |
Instance Method Details
#fetch ⇒ Object
7 8 9 10 |
# File 'lib/encase/singleton_item.rb', line 7 def fetch self.singleton = super unless self.singleton self.singleton end |