Class: Realize::Collection::Last

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

Overview

Transformer to get the last item of a collection

Instance Method Summary collapse

Instance Method Details

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



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

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