Sha256: e11dc83b35dbbc5e22b38dbb8c671a5402427e83a4f460dd2db6481e040a6bb6

Contents?: true

Size: 332 Bytes

Versions: 5

Compression:

Stored size: 332 Bytes

Contents

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

  def initialize(args, *options) #:nodoc:
    args[0] = args[0].gsub(/\./,'_')
    super
  end

  def create_presenter_file
    template "presenter.rb.erb", "app/presenters/#{file_name}_presenter.rb"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
delegated_presenter-1.1.2 lib/generators/delegated_presenter_generator.rb
delegated_presenter-1.0.3 lib/generators/delegated_presenter_generator.rb
delegated_presenter-1.0.0 lib/generators/delegated_presenter_generator.rb
delegated_presenter-0.1.1 lib/generators/delegated_presenter_generator.rb
delegated_presenter-0.1.0 lib/generators/delegated_presenter_generator.rb