Module: ConvenientService::Support::Castable Private

Extended by:
AbstractMethod
Includes:
Concern
Included in:
Common::Plugins::CanHaveCallbacks::Entities::Type, Core::Entities::Config::Entities::Concerns::Entities::Middleware, ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method::Entities::Directions
Defined in:
lib/convenient_service/support/castable.rb,
lib/convenient_service/support/castable/exceptions.rb

Overview

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

TODO: Specs for options.

Since:

  • 1.0.0

Defined Under Namespace

Modules: Exceptions

Class Method Summary collapse

Methods included from AbstractMethod

abstract_method

Methods included from Concern

included

Class Method Details

.cast!(other, **options) ⇒ Object

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.

Since:

  • 1.0.0



39
40
41
42
43
44
45
# File 'lib/convenient_service/support/castable.rb', line 39

def cast!(other, **options)
  casted = cast(other, **options)

  ::ConvenientService.raise Exceptions::FailedToCast.new(other: other, klass: self) unless casted

  casted
end