Sha256: a0ca45f95bb156443b07a2c0ba4b53b2165298aed03127657bc622cfae29c9b4

Contents?: true

Size: 1023 Bytes

Versions: 1

Compression:

Stored size: 1023 Bytes

Contents

# frozen_string_literal: true
require 'rails/generators'

module Anyicon
  module Generators
    # The InstallGenerator class is a Rails generator that sets up the initial configuration
    # for the Anyicon gem. This generator copies a template configuration file into the
    # Rails application's initializers directory, allowing the user to customize the icon
    # collections and other settings.
    #
    # Example usage:
    #
    #   # Run the generator from the command line
    #   rails generate anyicon:install
    #
    # This will copy the `anyicon.rb` template to `config/initializers/anyicon.rb` in your
    # Rails application.
    class InstallGenerator < ::Rails::Generators::Base
      source_root File.join(__dir__, 'templates')
      desc "This generator installs AnyIcon"

      # Copies the anyicon configuration template to the initializers directory.
      #
      # @return [void]
      def copy_config
        template 'anyicon.rb', 'config/initializers/anyicon.rb'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anyicon-1.0.0 lib/generators/anyicon/install/install_generator.rb