Sha256: d8b7e1587294e271ef39fd27e097457f8289df4bf52a5277a63d19eb09c82e4d

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

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 = {})
      options = stringify_keys(options)
      self.require_deps
      self.validate(options) if self.respond_to?(:validate)
      self.process(options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-import-0.1.0 lib/jekyll-import/importer.rb