Class: YFantasy::Transformations::CollectionTransformer

Inherits:
BaseTransform
  • Object
show all
Defined in:
lib/y_fantasy/transformations/collection_transformer.rb

Instance Method Summary collapse

Methods inherited from BaseTransform

#>>, #[], #call, #ensure_function_set, #t

Constructor Details

#initialize(collection) ⇒ CollectionTransformer



6
7
8
9
10
# File 'lib/y_fantasy/transformations/collection_transformer.rb', line 6

def initialize(collection)
  @collection = collection.to_sym
  @resource = T[:singularize].call(collection).to_sym
  @function = compose_function
end