Sha256: e29041a0fd6ed915abb412d45d57ffceb2f9441144892e6b4871de2667b311bb

Contents?: true

Size: 484 Bytes

Versions: 4

Compression:

Stored size: 484 Bytes

Contents

require 'chronicle/etl/models/base'

module Chronicle
  module ETL
    module Models
      class Generic < Chronicle::ETL::Models::Base
        TYPE = 'generic'

        attr_accessor :properties

        def initialize(properties = {})
          @properties = properties
          super
        end

        # Generic models have arbitrary attributes stored in @properties
        def attributes
          @properties.transform_keys(&:to_sym)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chronicle-etl-0.4.0 lib/chronicle/etl/models/generic.rb
chronicle-etl-0.3.1 lib/chronicle/etl/models/generic.rb
chronicle-etl-0.3.0 lib/chronicle/etl/models/generic.rb
chronicle-etl-0.2.4 lib/chronicle/etl/models/generic.rb