Sha256: 94cdb995f64c2e563e7060e98ae28f528acfc3489acb890d03d207ff430ec54b

Contents?: true

Size: 508 Bytes

Versions: 3

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

require "rails/generators/base"

module Yael
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      desc "This generator installs Yael"
      source_root File.expand_path("templates", __dir__)

      def copy_dispatch_map
        template "events.rb", "config/events.rb"
      end

      def copy_migration
        template "create_events.rb", "db/migrate/#{DateTime.current.strftime '%Y%m%d%H%M%S'}_create_yael_events.rb"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yael-0.0.3 lib/generators/yael/install/install_generator.rb
yael-0.0.2 lib/generators/yael/install/install_generator.rb
yael-0.0.1 lib/generators/yael/install/install_generator.rb