Sha256: 3916b05e0c61967bc5bf936e796201963c47596289245fa94cdbf62358fabde6

Contents?: true

Size: 423 Bytes

Versions: 6

Compression:

Stored size: 423 Bytes

Contents

module ThemeForRails
  module Generators
    class ThemeGenerator < Rails::Generators::NamedBase
      source_root File.expand_path("../templates", __FILE__)
      desc "Creates an empty theme."
      
      def create_theme
        theme_dir = File.join(themes_path, name)
        directory  'theme', theme_dir
      end
    private
      def themes_path
        File.join(Rails.root, "themes")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
themes_for_rails-0.3.1 lib/generators/theme_for_rails/theme_generator.rb
themes_for_rails-0.3.0 lib/generators/theme_for_rails/theme_generator.rb
themes_for_rails-0.2.5 lib/generators/theme_for_rails/theme_generator.rb
themes_for_rails-0.2.4 lib/generators/theme_for_rails/theme_generator.rb
themes_for_rails-0.2.2 lib/generators/theme_for_rails/theme_generator.rb
themes_for_rails-0.2.1 lib/generators/theme_for_rails/theme_generator.rb