Sha256: f37044707e1f17807157406552495011b715693166816bf8f82dc03f5bd88d5c
Contents?: true
Size: 498 Bytes
Versions: 2
Compression:
Stored size: 498 Bytes
Contents
# frozen_string_literal: true module SteelWheel class HandlerGenerator < Rails::Generators::NamedBase source_root File.expand_path('templates', __dir__) def copy_files if behavior == :revoke template 'handler_template.rb', "app/handlers/#{file_path}_handler.rb" elsif behavior == :invoke empty_directory Pathname.new('app/handlers').join(*class_path) template 'handler_template.rb', "app/handlers/#{file_path}_handler.rb" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
steel_wheel-0.6.1 | lib/generators/steel_wheel/handler/handler_generator.rb |
steel_wheel-0.6.0 | lib/generators/steel_wheel/handler/handler_generator.rb |