Sha256: 880ec456f332b924e1ed819750cade04da68ad9ee20989b186d1aadccbb8a3bb

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2020-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

module Realize
  class Collection
    # Transformer to get the last item of a collection
    class Last
      acts_as_hashable

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
realize-1.6.0 lib/realize/collection/last.rb
realize-1.5.0 lib/realize/collection/last.rb
realize-1.4.0 lib/realize/collection/last.rb