Sha256: 4cebd7a6d41a69b011540e5d67902083b33d4d9cc88fdab283c8b26304043501

Contents?: true

Size: 519 Bytes

Versions: 8

Compression:

Stored size: 519 Bytes

Contents

module Foobara
  class Entity < DetachedEntity
    module NewPrepend
      # rubocop:disable Lint/UselessMethodDefinition
      def new(...)
        super
      end
      # rubocop:enable Lint/UselessMethodDefinition

      alias __private_new__ new

      # rubocop:disable Lint/DuplicateMethods
      def new(...)
        # :nocov:
        raise "Cannot initialize a #{name}. Use .create, .thunk, .loaded, or .build instead."
        # :nocov:
      end
      # rubocop:enable Lint/DuplicateMethods
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foobara-0.0.38 projects/entity/src/new_prepend.rb
foobara-0.0.37 projects/entity/src/new_prepend.rb
foobara-0.0.36 projects/entity/src/new_prepend.rb
foobara-0.0.35 projects/entity/src/new_prepend.rb
foobara-0.0.34 projects/entity/src/new_prepend.rb
foobara-0.0.33 projects/entity/src/new_prepend.rb
foobara-0.0.32 projects/entity/src/new_prepend.rb
foobara-0.0.31 projects/entity/src/new_prepend.rb