Sha256: e1a6da1f88aaf3cf83548cf4371a9d968982689fea6eee85b64dd90e8756bcd1

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

class ServiceGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)

  def create_service_file
    template('service.rb', File.join('app/services', class_path, "#{file_name}.rb"))
  end

  def generate_locale_file
    return unless ActiveGenerator.configuration.autoload_service_generator_locale

    invoke('locale:service', [name])
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_generator-5.2.0 lib/generators/service/service_generator.rb
active_generator-5.1.0 lib/generators/service/service_generator.rb