Sha256: b93524e118d1b1ed0f4d3874a0a2a9b1e80079a2f960ad8f275e4c41daf66c28

Contents?: true

Size: 584 Bytes

Versions: 54

Compression:

Stored size: 584 Bytes

Contents

module Para
  module Component
    module Importable
      extend ActiveSupport::Concern

      included do
        configurable_on :importers
      end

      def importable?
        @importable ||= importers.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 importers
        @importers ||= if (importers = configuration['importers'].presence)
          eval(importers).map(&:constantize)
        else
          []
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/component/importable.rb
para-0.12.3 lib/para/component/importable.rb
para-0.12.2 lib/para/component/importable.rb
para-0.12.1 lib/para/component/importable.rb
para-0.12.0 lib/para/component/importable.rb
para-0.11.4 lib/para/component/importable.rb
para-0.11.3 lib/para/component/importable.rb
para-0.11.2 lib/para/component/importable.rb
para-0.11.1 lib/para/component/importable.rb
para-0.11.0 lib/para/component/importable.rb
para-0.10.0 lib/para/component/importable.rb
para-0.9.4 lib/para/component/importable.rb
para-0.9.3.3 lib/para/component/importable.rb
para-0.9.3.2 lib/para/component/importable.rb
para-0.9.3.1 lib/para/component/importable.rb
para-0.9.2 lib/para/component/importable.rb
para-0.9.0 lib/para/component/importable.rb
para-0.8.15 lib/para/component/importable.rb
para-0.8.14 lib/para/component/importable.rb
para-0.8.13 lib/para/component/importable.rb