Sha256: c869e03da3a554d19f043cb937e7396020d8cd8dde6f3773ea0a63c57797cc92

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 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 first item of a collection
    class First
      acts_as_hashable

      def transform(resolver, value, time, record)
        AtIndex.new(index: 0).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/first.rb
realize-1.5.0 lib/realize/collection/first.rb
realize-1.4.0 lib/realize/collection/first.rb