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.4283 lib/types/struct.rb
sorbet-runtime-0.4.4282 lib/types/struct.rb
sorbet-runtime-0.4.4280 lib/types/struct.rb
sorbet-runtime-0.4.4279 lib/types/struct.rb
sorbet-runtime-0.4.4277 lib/types/struct.rb
sorbet-runtime-0.4.4276 lib/types/struct.rb
sorbet-runtime-0.4.4275 lib/types/struct.rb
sorbet-runtime-0.4.4274 lib/types/struct.rb
sorbet-runtime-0.4.4273 lib/types/struct.rb
sorbet-runtime-0.4.4272 lib/types/struct.rb
sorbet-runtime-0.4.4271 lib/types/struct.rb
sorbet-runtime-0.4.4270 lib/types/struct.rb