Class: Mutant::Transform::Nullable Private
- Inherits:
-
Mutant::Transform
- Object
- Mutant::Transform
- Mutant::Transform::Nullable
- Defined in:
- lib/mutant/transform.rb
Overview
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.
Nullable wrapper: passes nil through, delegates non-nil to inner transform
Instance Method Summary collapse
-
#call(input) ⇒ Either<Error, Object>
private
Apply transformation to input.
- #slug ⇒ Object private
Instance Method Details
#call(input) ⇒ Either<Error, 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.
Apply transformation to input
416 417 418 |
# File 'lib/mutant/transform.rb', line 416 def call(input) input.nil? ? success(nil) : transform.call(input) end |
#slug ⇒ 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.
420 |
# File 'lib/mutant/transform.rb', line 420 def slug = "nullable(#{transform.slug})" |