Sha256: 9970d1e8b0152a6a33132b1298c0037f854579e716ac8b755e30d6d6501c7a3e

Contents?: true

Size: 750 Bytes

Versions: 8

Compression:

Stored size: 750 Bytes

Contents

module Alula
  class Generator
    autoload :Paginate, 'alula/generators/paginate'
    autoload :FeedBuilder, 'alula/generators/feedbuilder'
    autoload :Sitemap, 'alula/generators/sitemap'
    
    attr_reader :options
    attr_reader :site
    
    def self.load(opts)
      type = opts.delete(:type)
      options = opts.delete(:options)
      
      # Try to find our generator
      cls_name = self.constants.select {|t| t.to_s.downcase == type.downcase}.first
      if cls_name
        cls = self.const_get(cls_name)
        gen = cls.new(options, opts)
      end
    end
    
    def initialize(options, opts)
      @options = options
      @site = opts.delete(:site)
    end
    
    def substitutes(locale, item)
      {}
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alula-0.4.6 lib/alula/generator.rb
alula-0.4.5 lib/alula/generator.rb
alula-0.4.4 lib/alula/generator.rb
alula-0.4.3 lib/alula/generator.rb
alula-0.4.2 lib/alula/generator.rb
alula-0.4.1 lib/alula/generator.rb
alula-0.4.0 lib/alula/generator.rb
alula-0.4.0b lib/alula/generator.rb