Class: Mutant::Transform::Hash::Map Private
- Inherits:
-
Mutant::Transform
- Object
- Mutant::Transform
- Mutant::Transform::Hash::Map
- 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 keyed by data via mapping its pairs over key and value transforms
Where Hash names the keys it accepts, this accepts every key the key transform does.
Constant Summary collapse
- DUPLICATE_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.
'Key transform maps distinct keys onto one'
Instance Method Summary collapse
-
#call(input) ⇒ Either<Error, Hash>
private
Apply transformation to input.
Methods inherited from Mutant::Transform
Instance Method Details
#call(input) ⇒ Either<Error, Hash>
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
336 337 338 339 340 341 |
# File 'lib/mutant/transform.rb', line 336 def call(input) PRIMITIVE .call(input) .lmap(&method(:lift_error)) .bind(&method(:run)) end |