Sha256: f2ff447e79d033b727fc79913f2142cdd5977eca0ce7098df226590dca34d661
Contents?: true
Size: 455 Bytes
Versions: 25
Compression:
Stored size: 455 Bytes
Contents
class IronWorkerGenerator < 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
25 entries across 25 versions & 1 rubygems