Class: Dry::Container::Item::Callable
- Inherits:
-
Dry::Container::Item
- Object
- Dry::Container::Item
- Dry::Container::Item::Callable
- Defined in:
- lib/dry/container/item/callable.rb
Overview
Callable class to returns a item call
Instance Attribute Summary
Attributes inherited from Dry::Container::Item
Instance Method Summary collapse
-
#call ⇒ Mixed
Returns the result of item call or item.
Methods inherited from Dry::Container::Item
#callable?, #initialize, #map, #value?
Constructor Details
This class inherits a constructor from Dry::Container::Item
Instance Method Details
#call ⇒ Mixed
Returns the result of item call or item
16 17 18 |
# File 'lib/dry/container/item/callable.rb', line 16 def call callable? ? item.call : item end |