Sha256: ae4e17ce66ec1602e1efc51bea8701677633a9b74118ec2194b12f0142ff1dd0

Contents?: true

Size: 449 Bytes

Versions: 6

Compression:

Stored size: 449 Bytes

Contents

require 'rails/generators'
class CommonRepositoryModel::Collection < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)

  def create_collection
    template(
      'collection.rb.erb',
      File.join('app/repository_models/', "#{file_name}.rb")
    )
  end
  def create_service_spec
    template(
      'collection_spec.rb.erb',
      File.join('spec/repository_models/', "#{file_name}_spec.rb")
    )
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
common_repository_model-0.0.6 lib/generators/common_repository_model/collection/collection_generator.rb
common_repository_model-0.0.5 lib/generators/common_repository_model/collection/collection_generator.rb
common_repository_model-0.0.4 lib/generators/common_repository_model/collection/collection_generator.rb
common_repository_model-0.0.3 lib/generators/common_repository_model/collection/collection_generator.rb
common_repository_model-0.0.2 lib/generators/common_repository_model/collection/collection_generator.rb
common_repository_model-0.0.1 lib/generators/common_repository_model/collection/collection_generator.rb