Sha256: e08c52d92e55b997519431b96edd32541ffca1e53fd2314d42f152cd24cb0302

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

# frozen_string_literal: true

module Interage
  module Helper
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)

      desc 'Generates a application helper.'

      def create_application_helper
        copy_file 'application_helper.rb', application_helper_path
        copy_file 'application_helper.yml', application_locales_path
      end

      private

      def application_helper_path
        Rails.root.join('app/helpers/application_helper.rb')
      end

      def application_locales_path
        Rails.root.join('config/locales/pt-BR/application_helper.yml')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
interage-helper-0.1.4 lib/generators/interage/helper/install/install_generator.rb
interage-helper-0.1.3 lib/generators/interage/helper/install/install_generator.rb
interage-helper-0.1.2 lib/generators/interage/helper/install/install_generator.rb
interage-helper-0.1.1 lib/generators/interage/helper/install/install_generator.rb
interage-helper-0.1.0 lib/generators/interage/helper/install/install_generator.rb