Class: Realize::Collection::First

Inherits:
Object
  • Object
show all
Defined in:
lib/realize/collection/first.rb

Overview

Transformer to get the first item of a collection

Instance Method Summary collapse

Instance Method Details

#transform(resolver, value, time, record) ⇒ Object



16
17
18
# File 'lib/realize/collection/first.rb', line 16

def transform(resolver, value, time, record)
  AtIndex.new(index: 0).transform(resolver, value, time, record)
end