Sha256: 1b8839e504dc60987d31fa8f3ad1737adb24ab8b9b966a5874106312553f4cab

Contents?: true

Size: 561 Bytes

Versions: 9

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module JekyllImport
  class Importer
    def self.inherited(base)
      subclasses << base
    end

    def self.subclasses
      @subclasses ||= []
    end

    def self.stringify_keys(hash)
      the_hash = hash.clone
      the_hash.keys.each do |key|
        the_hash[(key.to_s rescue key) || key] = the_hash.delete(key)
      end
      the_hash
    end

    def self.run(options = {})
      opts = stringify_keys(options)
      require_deps
      validate(opts) if respond_to?(:validate)
      process(opts)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jekyll-import-0.19.2 lib/jekyll-import/importer.rb
jekyll-import-0.19.1 lib/jekyll-import/importer.rb
jekyll-import-0.19.0 lib/jekyll-import/importer.rb
jekyll-import-0.18.1 lib/jekyll-import/importer.rb
jekyll-import-0.18.0 lib/jekyll-import/importer.rb
jekyll-import-0.17.1 lib/jekyll-import/importer.rb
jekyll-import-0.17.0 lib/jekyll-import/importer.rb
jekyll-import-0.16.0 lib/jekyll-import/importer.rb
jekyll-import-0.15.0 lib/jekyll-import/importer.rb