Sha256: a36341930b92e0ace7d3be913618a4e79dd5f5167549df21543898a8a9421953

Contents?: true

Size: 510 Bytes

Versions: 26

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

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/entity/src/new_prepend.rb
foobara-0.0.25 projects/entity/src/new_prepend.rb
foobara-0.0.24 projects/entity/src/new_prepend.rb
foobara-0.0.23 projects/entity/src/new_prepend.rb
foobara-0.0.22 projects/entity/src/new_prepend.rb
foobara-0.0.21 projects/entity/src/new_prepend.rb
foobara-0.0.20 projects/entity/src/new_prepend.rb
foobara-0.0.19 projects/entity/src/new_prepend.rb
foobara-0.0.18 projects/entity/src/new_prepend.rb
foobara-0.0.17 projects/entity/src/new_prepend.rb
foobara-0.0.16 projects/entity/src/new_prepend.rb
foobara-0.0.15 projects/entity/src/new_prepend.rb
foobara-0.0.14 projects/entity/src/new_prepend.rb
foobara-0.0.13 projects/entity/src/new_prepend.rb
foobara-0.0.12 projects/entity/src/new_prepend.rb
foobara-0.0.11 projects/entity/src/new_prepend.rb
foobara-0.0.10 projects/entity/src/new_prepend.rb
foobara-0.0.9 projects/entity/src/new_prepend.rb
foobara-0.0.8 projects/entity/src/new_prepend.rb
foobara-0.0.7 projects/entity/src/new_prepend.rb