Class: Dry::Types::Default::Callable Private

Inherits:
Dry::Types::Default show all
Defined in:
lib/dry/types/default.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Dry::Types::Default

#value

Attributes included from Dry::Types::Decorator

#type

Attributes included from Options

#options

Instance Method Summary collapse

Methods inherited from Dry::Types::Default

[], #call_safe, #call_unsafe, #constrained, #default?, #initialize, #try, #valid?

Methods included from Printable

#to_s

Methods included from Builder

#&, #>, #constrained, #constrained_type, #constructor, #constructor_type, #default, #enum, #fallback, #lax, #maybe, #optional, #|

Methods included from Dry::Types::Decorator

#constrained?, #default?, #initialize, #respond_to_missing?, #to_proc, #try

Methods included from Options

#initialize, #with

Methods included from Type

#call, #valid?

Constructor Details

This class inherits a constructor from Dry::Types::Default

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Dry::Types::Decorator

Instance Method Details

#callable?true

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (true)


20
21
22
# File 'lib/dry/types/default.rb', line 20

def callable?
  true
end

#evaluateObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Evaluates given callable

Returns:

  • (Object)


15
16
17
# File 'lib/dry/types/default.rb', line 15

def evaluate
  value.call(type)
end