Sha256: 9424fbd1c0eead0f133fccb9755857f6656da86d83bb6586377f48fba8388485

Contents?: true

Size: 392 Bytes

Versions: 1

Compression:

Stored size: 392 Bytes

Contents

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

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

  def generate_locale_file
    invoke('locale:service'.freeze, [name]) if ActiveGenerator.configuration.autoload_service_generator_locale
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_generator-2.3.0 lib/generators/service/service_generator.rb