Sha256: 7e07a05e3e3aa31d3353a37ea6d4189b72df0f60d886e7b7cbe991bc94c3c12c

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

module Para
  module Component
    module Importable
      extend ActiveSupport::Concern

      included do
        configurable_on :importers
      end

      def importable?
        @importable ||= imports.length > 0
      end

      # TODO : Move :configuration column store to JSON instead of HStore
      # which handles more data types and will help us avoid eval here
      def imports
        @imports ||= if importers.present?
          eval(importers)
        else
          []
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
para-0.5.4 lib/para/component/importable.rb
para-0.5.3 lib/para/component/importable.rb
para-0.5.1 lib/para/component/importable.rb
para-0.5.0 lib/para/component/importable.rb