Class: Mutant::Transform::Hash::Key Private

Inherits:
Mutant::Transform show all
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.

Key specific transformation

Instance Method Summary collapse

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

Parameters:

  • (Object)

Returns:



286
287
288
289
290
# File 'lib/mutant/transform.rb', line 286

def call(input)
  transform.call(input).lmap do |error|
    error(cause: error, input: input)
  end
end

#slugString

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.

Rendering slug

Returns:

  • (String)


276
277
278
# File 'lib/mutant/transform.rb', line 276

def slug
  '[%<key>s]' % { key: value.inspect }
end