Sha256: 65f6af87d88e6c0426fd04eab79babf75343168a5adc657e6594b260fb2368b7

Contents?: true

Size: 700 Bytes

Versions: 13

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

require "rails/generators/base"

module Importo
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../templates", __dir__)

      desc "Creates a Importo initializer and copy locale files to your application."

      def copy_initializer
        template "importo.rb", "config/initializers/importo.rb"
      end

      def copy_locale
        copy_file "../../../config/locales/en.yml", "config/locales/importo.en.yml"
        copy_file "../../../config/locales/nl.yml", "config/locales/importo.nl.yml"
      end

      def show_readme
        readme "README" if behavior == :invoke
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
importo-3.0.21 lib/generators/importo/install_generator.rb
importo-3.0.20 lib/generators/importo/install_generator.rb
importo-3.0.19 lib/generators/importo/install_generator.rb
importo-3.0.18 lib/generators/importo/install_generator.rb
importo-3.0.17 lib/generators/importo/install_generator.rb
importo-3.0.16 lib/generators/importo/install_generator.rb
importo-3.0.15 lib/generators/importo/install_generator.rb
importo-3.0.14 lib/generators/importo/install_generator.rb
importo-3.0.13 lib/generators/importo/install_generator.rb
importo-3.0.12 lib/generators/importo/install_generator.rb
importo-3.0.11 lib/generators/importo/install_generator.rb
importo-3.0.10 lib/generators/importo/install_generator.rb
importo-3.0.9 lib/generators/importo/install_generator.rb