Class: Mutant::Transform::Hash Private
- Inherits:
-
Mutant::Transform
- Object
- Mutant::Transform
- Mutant::Transform::Hash
- 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.
Transform a hash via mapping it over key specific transforms
Defined Under Namespace
Classes: Key, Map, Slice, Symbolize
Constant Summary collapse
- KEY_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'Missing keys: %<missing>s, Unexpected keys: %<unexpected>s'- PRIMITIVE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Primitive.new(primitive: ::Hash)
Instance Method Summary collapse
-
#call(input) ⇒ Either<Error, Object>
private
Apply transformation to input.
Methods inherited from Mutant::Transform
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
372 373 374 375 376 377 378 |
# File 'lib/mutant/transform.rb', line 372 def call(input) PRIMITIVE .call(input) .lmap(&method(:lift_error)) .bind(&method(:reject_keys)) .bind(&method(:transform)) end |