engine/lib/generators/locomotive_generator.rb

14 lines
405 B
Ruby
Raw Normal View History

class LocomotiveGenerator < Rails::Generators::Base
2010-06-03 15:32:40 +00:00
class_option :update, :type => :boolean, :default => false,
:desc => "Just update public files, do not create seed"
def self.source_root
@_locomotive_source_root ||= File.dirname(__FILE__)
end
def copy_public_files
directory "../../public", "public", :recursive => true
exit(0) if options.update?
end
end