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

Version Path
iron_worker-2.4.3 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.4.2 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.4.1 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.4.0 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.17 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.16 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.15 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.14 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.13 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.12 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.11 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.10 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.9 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.8 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.7 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.6 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.5 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.4 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.3 lib/generators/iron_worker/iron_worker_generator.rb
iron_worker-2.3.2 lib/generators/iron_worker/iron_worker_generator.rb