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.
Class Method Details
Instance Method Details
#call(input) ⇒ Either<Error, Object>
Apply transformation to input
158 159 160 |
# File 'lib/morpher/transform.rb', line 158 def call(input) transform.call(input).lmap(&method(:wrap_error)) end |
#slug ⇒ Array<String>
Rendering slug
165 166 167 |
# File 'lib/morpher/transform.rb', line 165 def slug '%<index>d' % { index: index } end |