Sha256: 6d97531f3b09dbde90e3016a0ffc032b092bde1b656cfc53b13e956201e4d007

Contents?: true

Size: 434 Bytes

Versions: 2

Compression:

Stored size: 434 Bytes

Contents

require_relative '../generic_generator'

module SteelWheel
  class CommandGenerator < GenericGenerator
    setup_templates_root('command/templates')

    on_revoke do
      template 'command_template.rb', "app/commands/#{file_path}_command.rb"
    end

    on_invoke do
      empty_directory Pathname.new('app/commands').join(*class_path)
      template 'command_template.rb', "app/commands/#{file_path}_command.rb"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
steel_wheel-0.5.1 lib/generators/steel_wheel/command/command_generator.rb
steel_wheel-0.5.0 lib/generators/steel_wheel/command/command_generator.rb