Sha256: e85588e42ca5c6e809a0c48d721e64e6352d0af6fb77dab62abf8de89fbb01ae

Contents?: true

Size: 671 Bytes

Versions: 4

Compression:

Stored size: 671 Bytes

Contents

# Copyright:: (c) Autotelik Media Ltd 2015
# Author ::   Tom Statter
# Date ::     Jan 2015
# License::   MIT
#
# Details::  Store details of the inbound data from Excel,CSV files etc

module DataShift

  module InboundData

    # Store data supplied from client to find an instance of an object (e.g find Associations)

    # Klass.where( @field => @where_value)

    class LookupSupport

      attr_reader :klass, :field, :where_value

      def initialize(klass, in_name, where_value)
        @klass = klass
        @field = in_name
        @where_value = where_value
      end

      def find
        klass.where( field => where_value )
      end

    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
datashift-0.40.4 lib/datashift/inbound_data/lookup_support.rb
datashift-0.40.3 lib/datashift/inbound_data/lookup_support.rb
datashift-0.40.1 lib/datashift/inbound_data/lookup_support.rb
datashift-0.40.0 lib/datashift/inbound_data/lookup_support.rb