Class: Dry::Core::Container::Item::Callable

Inherits:
Dry::Core::Container::Item show all
Defined in:
lib/dry/core/container/item/callable.rb

Overview

Callable class to returns a item call

Instance Attribute Summary

Attributes inherited from Dry::Core::Container::Item

#item, #options

Instance Method Summary collapse

Methods inherited from Dry::Core::Container::Item

#callable?, #initialize, #map, #value?

Constructor Details

This class inherits a constructor from Dry::Core::Container::Item

Instance Method Details

#callMixed

Returns the result of item call or item

Returns:

  • (Mixed)


15
16
17
# File 'lib/dry/core/container/item/callable.rb', line 15

def call
  callable? ? item.call : item
end