Class: Morpher::Transform::Index
- Inherits:
-
Morpher::Transform
- Object
- Morpher::Transform
- Morpher::Transform::Index
- Defined in:
- lib/morpher/transform.rb
Overview
Index attached to a transform
Class Method Summary collapse
-
.wrap(cause, index) ⇒ Error
Create error at specified index.
Instance Method Summary collapse
-
#call(input) ⇒ Either<Error, Object>
Apply transformation to input.
-
#slug ⇒ Array<String>
Rendering slug.
Methods inherited from Morpher::Transform
Class Method Details
Instance Method Details
#call(input) ⇒ Either<Error, Object>
Apply transformation to input
181 182 183 |
# File 'lib/morpher/transform.rb', line 181 def call(input) transform.call(input).lmap(&method(:wrap_error)) end |
#slug ⇒ Array<String>
Rendering slug
188 189 190 |
# File 'lib/morpher/transform.rb', line 188 def slug '%<index>d' % { index: index } end |