Sha256: cd4404e645bf84fe552779b4cedcdd54d627da26091dc10dde101a88824a09d6

Contents?: true

Size: 442 Bytes

Versions: 972

Compression:

Stored size: 442 Bytes

Contents

# frozen_string_literal: true
# typed: true

class T::InexactStruct
  include T::Props
  include T::Props::Serializable
  include T::Props::Constructor
end

class T::Struct < T::InexactStruct
  def self.inherited(subclass)
    super(subclass)
    T::Private::ClassUtils.replace_method(subclass.singleton_class, :inherited) do |s|
      super(s)
      raise "#{self.name} is a subclass of T::Struct and cannot be subclassed"
    end
  end
end

Version data entries

972 entries across 972 versions & 1 rubygems

Version Path
sorbet-runtime-0.4.4305 lib/types/struct.rb
sorbet-runtime-0.4.4304 lib/types/struct.rb
sorbet-runtime-0.4.4303 lib/types/struct.rb
sorbet-runtime-0.4.4302 lib/types/struct.rb
sorbet-runtime-0.4.4301 lib/types/struct.rb
sorbet-runtime-0.4.4300 lib/types/struct.rb
sorbet-runtime-0.4.4299 lib/types/struct.rb
sorbet-runtime-0.4.4298 lib/types/struct.rb
sorbet-runtime-0.4.4297 lib/types/struct.rb
sorbet-runtime-0.4.4296 lib/types/struct.rb
sorbet-runtime-0.4.4295 lib/types/struct.rb
sorbet-runtime-0.4.4294 lib/types/struct.rb
sorbet-runtime-0.4.4293 lib/types/struct.rb
sorbet-runtime-0.4.4292 lib/types/struct.rb
sorbet-runtime-0.4.4289 lib/types/struct.rb
sorbet-runtime-0.4.4288 lib/types/struct.rb
sorbet-runtime-0.4.4287 lib/types/struct.rb
sorbet-runtime-0.4.4286 lib/types/struct.rb
sorbet-runtime-0.4.4285 lib/types/struct.rb
sorbet-runtime-0.4.4284 lib/types/struct.rb