Sha256: a3cb4646623edc5c1e84669396a314768be82d4fc4fa20c2f66b3534476514f9
Contents?: true
Size: 730 Bytes
Versions: 47
Compression:
Stored size: 730 Bytes
Contents
# frozen_string_literal: true module Spotlight module Etl # Basic ETL source implementations module Sources # A simple source that just returns the original resource(s) IdentitySource = lambda do |context| Array.wrap(context.resource) end # A transform step that calls a method on the resource to generate a source def self.SourceMethodSource(method) # rubocop:disable Naming/MethodName lambda do |context| context.resource.public_send(method) end end # A simple source that retrieves the stored data from a Spotlight::Resource StoredData = lambda do |context, **| Array.wrap(context.resource.data) end end end end
Version data entries
47 entries across 47 versions & 1 rubygems