Sha256: a36341930b92e0ace7d3be913618a4e79dd5f5167549df21543898a8a9421953

Contents?: true

Size: 510 Bytes

Versions: 27

Compression:

Stored size: 510 Bytes

Contents

module Foobara
  class Entity < Model
    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

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/entity/src/new_prepend.rb
foobara-0.0.6 projects/entity/src/new_prepend.rb
foobara-0.0.5 projects/entity/src/new_prepend.rb
foobara-0.0.4 projects/entity/src/new_prepend.rb
foobara-0.0.3 projects/entity/src/new_prepend.rb
foobara-0.0.2 projects/entity/src/new_prepend.rb
foobara-0.0.1 projects/entity/src/new_prepend.rb