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.5.10152 lib/types/struct.rb
sorbet-runtime-0.5.10151 lib/types/struct.rb
sorbet-runtime-0.5.10148 lib/types/struct.rb
sorbet-runtime-0.5.10145 lib/types/struct.rb
sorbet-runtime-0.5.10141 lib/types/struct.rb
sorbet-runtime-0.5.10139 lib/types/struct.rb
sorbet-runtime-0.5.10138 lib/types/struct.rb
sorbet-runtime-0.5.10133 lib/types/struct.rb
sorbet-runtime-0.5.10132 lib/types/struct.rb
sorbet-runtime-0.5.10127 lib/types/struct.rb
sorbet-runtime-0.5.10125 lib/types/struct.rb
sorbet-runtime-0.5.10118 lib/types/struct.rb
sorbet-runtime-0.5.10116 lib/types/struct.rb
sorbet-runtime-0.5.10109 lib/types/struct.rb
sorbet-runtime-0.5.10101 lib/types/struct.rb
sorbet-runtime-0.5.10100 lib/types/struct.rb
sorbet-runtime-0.5.10098 lib/types/struct.rb
sorbet-runtime-0.5.10097 lib/types/struct.rb
sorbet-runtime-0.5.10096 lib/types/struct.rb
sorbet-runtime-0.5.10095 lib/types/struct.rb