Sha256: 39eeb2cef4979015b08fdc6051f3d72b70c086da40ee1ae5367c2c6a99c3338b
Contents?: true
Size: 457 Bytes
Versions: 32
Compression:
Stored size: 457 Bytes
Contents
class SimpleWorkerGenerator < Rails::Generators::NamedBase source_root File.expand_path("../templates", __FILE__) desc "Creates a new skeleton worker - NAME is camelized" def create_worker_file # file_name needs to be classified @camel = file_name.camelize if not File.directory? "#{Rails.root}/app/workers" Dir.mkdir "#{Rails.root}/app/workers" end template "template_worker.erb", "app/workers/#{file_name}.rb" end end
Version data entries
32 entries across 32 versions & 1 rubygems