Sha256: 1ea4867d2a4edb9b600b580cf93f8973216db5611f466ca1f833d78926a906dd

Contents?: true

Size: 739 Bytes

Versions: 6

Compression:

Stored size: 739 Bytes

Contents

require 'padrino-core/support_lite'
Dir[File.dirname(__FILE__) + '/padrino-gen/generators/{components}/**/*.rb'].each { |lib| require lib }
require File.dirname(__FILE__) + '/padrino-gen/generators/actions.rb'
require File.dirname(__FILE__) + '/padrino-gen/generators/base.rb'

module Padrino
  module Generators

    class << self
      def load_paths
        @load_paths ||= Dir[File.dirname(__FILE__) + '/padrino-gen/generators/{app,mailer,controller,model,migration}.rb']
      end

      def mappings
        @mappings ||= SupportLite::OrderedHash.new
      end

      def add_generator(name, klass)
        mappings[name] = klass
      end

      def lockup!
        load_paths.each { |lib| require lib  }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
padrino-gen-0.5.0 lib/padrino-gen.rb
padrino-gen-0.4.6 lib/padrino-gen.rb
padrino-gen-0.4.5 lib/padrino-gen.rb
padrino-gen-0.2.9 lib/padrino-gen.rb
padrino-gen-0.2.6 lib/padrino-gen.rb
padrino-gen-0.2.5 lib/padrino-gen.rb