Sha256: 3af086741e780940dc45134af0242b0bb73a29436152bd44b3b2a508694da718

Contents?: true

Size: 476 Bytes

Versions: 30

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true

module Totoro
  class WorkerGenerator < Rails::Generators::Base
    desc 'Generate totoro worker file'

    source_root File.expand_path('templates', __dir__)
    argument :name, type: :string
    argument :queue, type: :string, required: false
    argument :prefix, type: :string, required: false

    def copy_config_file
      template 'worker.rb.erb',
               File.join('app/models/worker', "#{name.underscore}.rb")
    end
  end
end

Version data entries

30 entries across 29 versions & 1 rubygems

Version Path
totoro-1.0.7 lib/generators/totoro/worker_generator.rb
totoro-1.0.6 pkg/totoro-1.0.5/lib/generators/totoro/worker_generator.rb
totoro-1.0.6 lib/generators/totoro/worker_generator.rb
totoro-1.0.5 lib/generators/totoro/worker_generator.rb
totoro-1.0.4 lib/generators/totoro/worker_generator.rb
totoro-1.0.3 lib/generators/totoro/worker_generator.rb
totoro-1.0.2 lib/generators/totoro/worker_generator.rb
totoro-1.0.1 lib/generators/totoro/worker_generator.rb
totoro-1.0.0 lib/generators/totoro/worker_generator.rb
totoro-0.6.1 lib/generators/totoro/worker_generator.rb
totoro-0.6.0 lib/generators/totoro/worker_generator.rb
totoro-0.5.7 lib/generators/totoro/worker_generator.rb
totoro-0.5.6 lib/generators/totoro/worker_generator.rb
totoro-0.5.5 lib/generators/totoro/worker_generator.rb
totoro-0.5.4 lib/generators/totoro/worker_generator.rb
totoro-0.5.3 lib/generators/totoro/worker_generator.rb
totoro-0.5.2 lib/generators/totoro/worker_generator.rb
totoro-0.5.1 lib/generators/totoro/worker_generator.rb
totoro-0.5.0 lib/generators/totoro/worker_generator.rb
totoro-0.4.1 lib/generators/totoro/worker_generator.rb