Sha256: 7c9ce517880dfe03db0c510919bc76ae154ab1d35da75eafe5d3b1eda8e8ec3a

Contents?: true

Size: 434 Bytes

Versions: 2

Compression:

Stored size: 434 Bytes

Contents

require_relative '../generic_generator'

module SteelWheel
  class HandlerGenerator < GenericGenerator
    setup_templates_root('handler/templates')

    on_revoke do
      template 'handler_template.rb', "app/handlers/#{file_path}_handler.rb"
    end

    on_invoke do
      empty_directory Pathname.new('app/handlers').join(*class_path)
      template 'handler_template.rb', "app/handlers/#{file_path}_handler.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/handler/handler_generator.rb
steel_wheel-0.5.0 lib/generators/steel_wheel/handler/handler_generator.rb