module Guardsman
  module Generators
    class GuardGenerator < Rails::Generators::NamedBase
      source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))

      def create_guard
        template 'guard.rb', File.join('app/guards', class_path, "#{file_name}_guard.rb")
      end
    end
  end
end
