Sha256: 42da61a76ce4bd31b27a1fa778e4699084957b53e12c0cff56f50ef4bb0613fb

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

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
    invoke('locale:service', [name]) if ActiveGenerator.configuration.autoload_service_generator_locale
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_generator-2.4.0 lib/generators/service/service_generator.rb
active_generator-2.3.1 lib/generators/service/service_generator.rb