Sha256: c576e53190b4b53e734341928977e5eaf9e100f9b18ad18633f7d94548be52ee

Contents?: true

Size: 425 Bytes

Versions: 793

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true
# typed: true

# Holds a string. Useful for showing type aliases in error messages
class T::Private::Types::StringHolder < T::Types::Base
  attr_reader :string

  def initialize(string)
    @string = string
  end

  # @override Base
  def name
    string
  end

  # @override Base
  def valid?(obj)
    false
  end

  # @override Base
  private def subtype_of_single?(other)
    false
  end
end

Version data entries

793 entries across 793 versions & 1 rubygems

Version Path
sorbet-runtime-0.4.4294 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4293 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4292 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4289 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4288 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4287 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4286 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4285 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4284 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4283 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4282 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4280 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4279 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4277 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4276 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4275 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4274 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4273 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4272 lib/types/private/types/string_holder.rb
sorbet-runtime-0.4.4271 lib/types/private/types/string_holder.rb