Sha256: 50dd4d318120545b787da956e78ac7311c70cd7f1cdcfe6a9ea9f8ba9c8f6a6b
Contents?: true
Size: 615 Bytes
Versions: 9
Compression:
Stored size: 615 Bytes
Contents
require 'rails/generators' module Genesis class ContextsGenerator < Rails::Generators::Base desc "Description:\n Generate one or more context folders." argument :contexts, :type => :string, :required => true def self.source_root File.join File.dirname(__FILE__), 'templates' end def install_contexts normalized_contexts.each do |context| empty_directory File.join( Genesis::SEEDS_ROOT, 'contexts', context ) end end def normalized_contexts return contexts if contexts.is_a?( Array ) contexts.split ',' end end end
Version data entries
9 entries across 9 versions & 1 rubygems