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.5.6426 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6425 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6424 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6423 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6418 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6415 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6412 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6408 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6407 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6405 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6403 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6401 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6400 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6398 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6397 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6395 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6393 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6391 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6389 lib/types/private/types/string_holder.rb
sorbet-runtime-0.5.6388 lib/types/private/types/string_holder.rb