Sha256: afa3adafbd0c9241e63cff2db3e4ad5f9cd97372a5ace9f68cedb86dec1f632b

Contents?: true

Size: 556 Bytes

Versions: 6

Compression:

Stored size: 556 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
      hash.each_key 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

6 entries across 6 versions & 1 rubygems

Version Path
jekyll-import-0.25.0 lib/jekyll-import/importer.rb
jekyll-import-0.24.0 lib/jekyll-import/importer.rb
jekyll-import-0.23.0 lib/jekyll-import/importer.rb
jekyll-import-0.22.0 lib/jekyll-import/importer.rb
jekyll-import-0.21.0 lib/jekyll-import/importer.rb
jekyll-import-0.20.0 lib/jekyll-import/importer.rb