repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/compatibility_patches.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/compatibility_patches.rb | # frozen_string_literal: true
# typed: ignore
# Work around an interaction bug with sorbet-runtime and rspec-mocks,
# which occurs when using message expectations (*_any_instance_of,
# expect, allow) and and_call_original.
#
# When a sig is defined, sorbet-runtime will replace the sigged method
# with a wrapper that, ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/final.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/final.rb | # frozen_string_literal: true
# typed: false
module T::Private::Final
module NoInherit
def inherited(arg)
super(arg)
raise "#{self} was declared as final and cannot be inherited"
end
end
module NoIncludeExtend
def included(arg)
super(arg)
raise "#{self} was declared as final ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/decl_state.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/decl_state.rb | # frozen_string_literal: true
# typed: true
class T::Private::DeclState
def self.current
Thread.current[:opus_types__decl_state] ||= self.new
end
def self.current=(other)
Thread.current[:opus_types__decl_state] = other
end
attr_accessor :active_declaration
attr_accessor :skip_on_method_added
d... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/casts.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/casts.rb | # frozen_string_literal: true
# typed: false
module T::Private
module Casts
def self.cast(value, type, cast_method)
begin
coerced_type = T::Utils::Private.coerce_and_check_module_types(type, value, true)
return value unless coerced_type
error = coerced_type.error_message_for_obj(va... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/caller_utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/caller_utils.rb | # frozen_string_literal: true
# typed: false
module T::Private::CallerUtils
if Thread.respond_to?(:each_caller_location) # RUBY_VERSION >= "3.2"
def self.find_caller
skipped_first = false
Thread.each_caller_location do |loc|
unless skipped_first
skipped_first = true
next
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/sealed.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/sealed.rb | # frozen_string_literal: true
# typed: false
module T::Private::Sealed
module NoInherit
def inherited(child)
super
caller_loc = T::Private::CallerUtils.find_caller { |loc| loc.base_label != 'inherited' }
T::Private::Sealed.validate_inheritance(caller_loc, self, child, 'inherited')
@sorbet... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/retry.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/retry.rb | # frozen_string_literal: true
# typed: true
module T::Private::Retry
# A special singleton used for static analysis of exceptions.
module RETRY
freeze
end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/class_utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/class_utils.rb | # frozen_string_literal: true
# typed: false
# Cut down version of Chalk::Tools::ClassUtils with only :replace_method functionality.
# Extracted to a separate namespace so the type system can be used standalone.
module T::Private::ClassUtils
class ReplacedMethod
def initialize(mod, old_method, new_method, overwr... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/runtime_levels.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/runtime_levels.rb | # frozen_string_literal: true
# typed: true
# Used in `sig.checked(level)` to determine when runtime type checking
# is enabled on a method.
module T::Private::RuntimeLevels
LEVELS = [
# Validate every call in every environment
:always,
# Validate in tests, but not in production
:tests,
# Don't e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/declare.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/declare.rb | # frozen_string_literal: true
# typed: true
module T::Private::Abstract::Declare
Abstract = T::Private::Abstract
AbstractUtils = T::AbstractUtils
def self.declare_abstract(mod, type:)
if AbstractUtils.abstract_module?(mod)
raise "#{mod} is already declared as abstract"
end
if T::Private::Final... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/data.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/data.rb | # frozen_string_literal: true
# typed: true
# We need to associate data with abstract modules. We could add instance methods to them that
# access ivars, but those methods will unnecessarily pollute the module namespace, and they'd
# have access to other private state and methods that they don't actually need. We also... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/hooks.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/hooks.rb | # frozen_string_literal: true
# typed: true
module T::Private::Abstract::Hooks
# This will become the self.extend_object method on a module that extends Abstract::Hooks.
# It gets called when *that* module gets extended in another class/module (similar to the
# `extended` hook, but this gets calls before the anc... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/validate.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/abstract/validate.rb | # frozen_string_literal: true
# typed: true
module T::Private::Abstract::Validate
Abstract = T::Private::Abstract
AbstractUtils = T::AbstractUtils
Methods = T::Private::Methods
SignatureValidation = T::Private::Methods::SignatureValidation
def self.validate_abstract_module(mod)
type = Abstract::Data.get... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/signature_validation.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/signature_validation.rb | # frozen_string_literal: true
# typed: true
module T::Private::Methods::SignatureValidation
Methods = T::Private::Methods
Modes = Methods::Modes
def self.validate(signature)
# Constructors in any language are always a bit weird: they're called in a
# static context, but their bodies are implemented by i... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/modes.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/modes.rb | # frozen_string_literal: true
# typed: true
module T::Private::Methods::Modes
def self.standard
'standard'
end
def self.abstract
'abstract'
end
def self.overridable
'overridable'
end
def self.override
'override'
end
def self.overridable_override
'overridable_override'
end
def ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/_methods.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/_methods.rb | # frozen_string_literal: true
# typed: false
module T::Private::Methods
@installed_hooks = {}
if defined?(Concurrent::Hash)
@signatures_by_method = Concurrent::Hash.new
@sig_wrappers = Concurrent::Hash.new
else
@signatures_by_method = {}
@sig_wrappers = {}
end
@sigs_that_raised = {}
# store... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/call_validation_2_7.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/call_validation_2_7.rb | # frozen_string_literal: true
# typed: false
# DO NOT EDIT. This file is autogenerated. To regenerate, run:
#
# bazel test //gems/sorbet-runtime:update_call_validation
module T::Private::Methods::CallValidation
def self.create_validator_method_fast(mod, original_method, method_sig, original_visibility)
if m... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/signature.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/signature.rb | # frozen_string_literal: true
# typed: true
class T::Private::Methods::Signature
attr_reader :method, :method_name, :arg_types, :kwarg_types, :block_type, :block_name,
:rest_type, :rest_name, :keyrest_type, :keyrest_name, :bind,
:return_type, :mode, :req_arg_count, :req_kwarg_names, :has_... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/call_validation.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/call_validation.rb | # frozen_string_literal: true
# typed: false
module T::Private::Methods::CallValidation
CallValidation = T::Private::Methods::CallValidation
Modes = T::Private::Methods::Modes
# Wraps a method with a layer of validation for the given type signature.
# This wrapper is meant to be fast, and is applied by a prev... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/decl_builder.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/methods/decl_builder.rb | # frozen_string_literal: true
# typed: true
module T::Private::Methods
Declaration = Struct.new(:mod, :params, :returns, :bind, :mode, :checked, :finalized, :on_failure, :override_allow_incompatible, :type_parameters, :raw)
class DeclBuilder
attr_reader :decl
class BuilderError < StandardError; end
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/simple_pair_union.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/simple_pair_union.rb | # frozen_string_literal: true
# typed: true
# Specialization of Union for the common case of the union of two simple types.
#
# This covers e.g. T.nilable(SomeModule), T.any(Integer, Float), and T::Boolean.
class T::Private::Types::SimplePairUnion < T::Types::Union
class DuplicateType < RuntimeError; end
# @param... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/string_holder.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/string_holder.rb | # 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
def build_type
nil
end
# overrides Base
def name
string
e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/void.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/void.rb | # frozen_string_literal: true
# typed: true
# A marking class for when methods return void.
# Should never appear in types directly.
module T::Private::Types
class Void < T::Types::Base
ERROR_MESSAGE = "Validation is being done on an `Void`. Please report this bug at https://github.com/sorbet/sorbet/issues"
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/not_typed.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/not_typed.rb | # frozen_string_literal: true
# typed: true
# A placeholder for when an untyped thing must provide a type.
# Raises an exception if it is ever used for validation.
class T::Private::Types::NotTyped < T::Types::Base
ERROR_MESSAGE = "Validation is being done on a `NotTyped`. Please report this bug at https://github.co... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/type_alias.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/types/type_alias.rb | # frozen_string_literal: true
# typed: true
module T::Private::Types
# Wraps a proc for a type alias to defer its evaluation.
class TypeAlias < T::Types::Base
def initialize(callable)
@callable = callable
end
def build_type
nil
end
def aliased_type
@aliased_type ||= T::Util... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/mixins/mixins.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/private/mixins/mixins.rb | # frozen_string_literal: true
# typed: true
module T::Private
module MixesInClassMethods
def included(other)
mods = Abstract::Data.get(self, :class_methods_mixins)
mods.each { |mod| other.extend(mod) }
super
end
end
module Mixins
def self.declare_mixes_in_class_methods(mixin, class... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_parameter.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_parameter.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypeParameter < Base
module Private
@pool = {}
def self.cached_entry(name)
@pool[name]
end
def self.set_entry_for(name, type)
@pool[name] = type
end
end
def initialize(name)
raise Argu... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator_lazy.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator_lazy.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedEnumeratorLazy < TypedEnumerable
def underlying_class
Enumerator::Lazy
end
# overrides Base
def name
"T::Enumerator::Lazy[#{type.name}]"
end
# overrides Base
def recursively_valid?(obj)
obj.is_a?(En... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/untyped.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/untyped.rb | # frozen_string_literal: true
# typed: true
module T::Types
# A dynamic type, which permits whatever
class Untyped < Base
def initialize; end
def build_type
nil
end
# overrides Base
def name
"T.untyped"
end
# overrides Base
def valid?(obj)
true
end
# o... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/proc.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/proc.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Defines the type of a proc (a ruby callable). At runtime, only
# validates that the value is a `::Proc`.
#
# At present, we only support fixed-arity procs with no optional or
# keyword arguments.
class Proc < Base
def initialize(arg_types, r... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_set.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_set.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedSet < TypedEnumerable
def underlying_class
Set
end
# overrides Base
def name
"T::Set[#{type.name}]"
end
# overrides Base
def recursively_valid?(obj)
return false if Object.autoload?(:Set) # Set is m... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/class_of.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/class_of.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Validates that an object belongs to the specified class.
class ClassOf < Base
attr_reader :type
def initialize(type)
@type = type
end
def build_type
nil
end
# overrides Base
def name
"T.class_of(#{@type})... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_hash.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_hash.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedHash < TypedEnumerable
def underlying_class
Hash
end
def initialize(keys:, values:)
@inner_keys = keys
@inner_values = values
end
# Technically we don't need this, but it is a nice api
def keys
@k... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_member.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_member.rb | # frozen_string_literal: true
# typed: strict
module T::Types
class TypeMember < TypeVariable
end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerable.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerable.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Note: All subclasses of Enumerable should add themselves to the
# `case` statement below in `describe_obj` in order to get better
# error messages.
class TypedEnumerable < Base
def initialize(type)
@inner_type = type
end
def type
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_variable.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_variable.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Since we do type erasure at runtime, this just validates the variance and
# provides some syntax for the static type checker
class TypeVariable < Base
attr_reader :variance
VALID_VARIANCES = %i[in out invariant].freeze
def initialize(var... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_class.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_class.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedClass < T::Types::Base
def initialize(type)
@inner_type = type
end
def type
@type ||= T::Utils.coerce(@inner_type)
end
def build_type
type
nil
end
# overrides Base
def name
"T::Clas... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/fixed_array.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/fixed_array.rb | # frozen_string_literal: true
# https://jira.corp.stripe.com/browse/RUBYPLAT-1107
# typed: false
module T::Types
# Takes a list of types. Validates each item in an array using the type in the same position
# in the list.
class FixedArray < Base
def initialize(types)
@inner_types = types
end
de... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/base.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/base.rb | # frozen_string_literal: true
# typed: true
module T::Types
class Base
def self.method_added(method_name)
super(method_name)
# What is now `subtype_of_single?` used to be named `subtype_of?`. Make sure people don't
# override the wrong thing.
#
# NB: Outside of T::Types, we would en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator_chain.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator_chain.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedEnumeratorChain < TypedEnumerable
def underlying_class
Enumerator::Chain
end
# overrides Base
def name
"T::Enumerator::Chain[#{type.name}]"
end
# overrides Base
def recursively_valid?(obj)
obj.is_a?... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/fixed_hash.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/fixed_hash.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Takes a hash of types. Validates each item in a hash using the type in the same position
# in the list.
class FixedHash < Base
def initialize(types)
@inner_types = types
end
def types
@types ||= @inner_types.transform_values {... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/noreturn.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/noreturn.rb | # frozen_string_literal: true
# typed: true
module T::Types
# The bottom type
class NoReturn < Base
def initialize; end
def build_type
nil
end
# overrides Base
def name
"T.noreturn"
end
# overrides Base
def valid?(obj)
false
end
# overrides Base
pri... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/union.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/union.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Takes a list of types. Validates that an object matches at least one of the types.
class Union < Base
# Don't use Union.new directly, use `Private::Pool.union_of_types`
# inside sorbet-runtime and `T.any` elsewhere.
def initialize(types)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/simple.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/simple.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Validates that an object belongs to the specified class.
class Simple < Base
NAME_METHOD = Module.instance_method(:name)
private_constant(:NAME_METHOD)
attr_reader :raw_type
def initialize(raw_type)
@raw_type = raw_type
end
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/enum.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/enum.rb | # frozen_string_literal: true
# typed: true
module T::Types
# validates that the provided value is within a given set/enum
class Enum < Base
extend T::Sig
attr_reader :values
def initialize(values)
case values
when Hash
@values = values
else
require "set" unless defi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_template.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/type_template.rb | # frozen_string_literal: true
# typed: strict
module T::Types
class TypeTemplate < TypeVariable
end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_enumerator.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedEnumerator < TypedEnumerable
def underlying_class
Enumerator
end
# overrides Base
def name
"T::Enumerator[#{type.name}]"
end
# overrides Base
def recursively_valid?(obj)
obj.is_a?(Enumerator) && sup... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/anything.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/anything.rb | # frozen_string_literal: true
# typed: true
module T::Types
# The top type
class Anything < Base
def initialize; end
def build_type
nil
end
# overrides Base
def name
"T.anything"
end
# overrides Base
def valid?(obj)
true
end
# overrides Base
private... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/self_type.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/self_type.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Modeling self-types properly at runtime would require additional tracking,
# so at runtime we permit all values and rely on the static checker.
class SelfType < Base
def initialize(); end
def build_type
nil
end
# overrides Bas... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_module.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_module.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedModule < T::Types::Base
def initialize(type)
@inner_type = type
end
def type
@type ||= T::Utils.coerce(@inner_type)
end
def build_type
type
nil
end
# overrides Base
def name
"T::Mod... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/attached_class.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/attached_class.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Modeling AttachedClass properly at runtime would require additional
# tracking, so at runtime we permit all values and rely on the static checker.
# As AttachedClass is modeled statically as a type member on every singleton
# class, this is consiste... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/t_enum.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/t_enum.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Validates that an object is equal to another T::Enum singleton value.
class TEnum < Base
attr_reader :val
def initialize(val)
@val = val
end
def build_type
nil
end
# overrides Base
def name
# Strips the #... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_array.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_array.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedArray < TypedEnumerable
# overrides Base
def name
"T::Array[#{type.name}]"
end
def underlying_class
Array
end
# overrides Base
def recursively_valid?(obj)
obj.is_a?(Array) && super
end
# ov... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/intersection.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/intersection.rb | # frozen_string_literal: true
# typed: true
module T::Types
# Takes a list of types. Validates that an object matches all of the types.
class Intersection < Base
def initialize(types)
@inner_types = types
end
def types
@types ||= @inner_types.flat_map do |type|
type = T::Utils.reso... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_range.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/types/typed_range.rb | # frozen_string_literal: true
# typed: true
module T::Types
class TypedRange < TypedEnumerable
def underlying_class
Range
end
# overrides Base
def name
"T::Range[#{type.name}]"
end
# overrides Base
def recursively_valid?(obj)
obj.is_a?(Range) && super
end
# ov... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/serializable.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/serializable.rb | # frozen_string_literal: true
# typed: false
module T::Props::Serializable
include T::Props::Plugin
# Required because we have special handling for `optional: false`
include T::Props::Optional
# Required because we have special handling for extra_props
include T::Props::PrettyPrintable
# Serializes this o... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/errors.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/errors.rb | # frozen_string_literal: true
# typed: strict
module T::Props
class Error < StandardError; end
class InvalidValueError < Error; end
class ImmutableProp < Error; end
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/weak_constructor.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/weak_constructor.rb | # frozen_string_literal: true
# typed: false
module T::Props::WeakConstructor
include T::Props::Optional
extend T::Sig
# checked(:never) - O(runtime object construction)
sig { params(hash: T::Hash[Symbol, T.untyped]).void.checked(:never) }
def initialize(hash={})
decorator = self.class.decorator
ha... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/optional.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/optional.rb | # frozen_string_literal: true
# typed: false
module T::Props::Optional
include T::Props::Plugin
end
##############################################
# NB: This must stay in the same file where T::Props::Optional is defined due to
# T::Props::Decorator#apply_plugin; see https://git.corp.stripe.com/stripe-internal/pay... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/utils.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/utils.rb | # frozen_string_literal: true
# typed: true
module T::Props::Utils
# Deep copy an object. The object must consist of Ruby primitive
# types and Hashes and Arrays.
def self.deep_clone_object(what, freeze: false)
result = case what
when true
true
when false
false
when Symbol, NilClass, ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/type_validation.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/type_validation.rb | # frozen_string_literal: true
# typed: false
module T::Props::TypeValidation
include T::Props::Plugin
BANNED_TYPES = [Object, BasicObject, Kernel].freeze
class UnderspecifiedType < ArgumentError; end
module DecoratorMethods
extend T::Sig
sig { params(key: Symbol).returns(T::Boolean).checked(:never)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/constructor.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/constructor.rb | # frozen_string_literal: true
# typed: false
module T::Props::Constructor
include T::Props::WeakConstructor
end
module T::Props::Constructor::DecoratorMethods
extend T::Sig
# Set values for all props that have no defaults. Override what `WeakConstructor`
# does in order to raise errors on nils instead of ign... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/pretty_printable.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/pretty_printable.rb | # frozen_string_literal: true
# typed: true
require 'pp'
module T::Props::PrettyPrintable
include T::Props::Plugin
# Override the PP gem with something that's similar, but gives us a hook to do redaction and customization
def pretty_print(pp)
klass = T.unsafe(T.cast(self, Object).class).decorator
multil... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/plugin.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/plugin.rb | # frozen_string_literal: true
# typed: false
module T::Props::Plugin
include T::Props
extend T::Helpers
module ClassMethods
def included(child)
super
child.plugin(self)
end
end
mixes_in_class_methods(ClassMethods)
module Private
# These need to be non-instance methods so we can us... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/has_lazily_specialized_methods.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/has_lazily_specialized_methods.rb | # frozen_string_literal: true
# typed: false
module T::Props
# Helper for generating methods that replace themselves with a specialized
# version on first use. The main use case is when we want to generate a
# method using the full set of props on a class; we can't do that during
# prop definition because we ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/_props.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/_props.rb | # frozen_string_literal: true
# typed: true
# A mixin for defining typed properties (attributes).
# To get serialization methods (to/from JSON-style hashes), add T::Props::Serializable.
# To get a constructor based on these properties, inherit from T::Struct.
module T::Props
extend T::Helpers
#####
# CAUTION: T... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/decorator.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/decorator.rb | # frozen_string_literal: true
# typed: strict
# NB: This is not actually a decorator. It's just named that way for consistency
# with DocumentDecorator and ModelDecorator (which both seem to have been written
# with an incorrect understanding of the decorator pattern). These "decorators"
# should really just be static... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/custom_type.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/custom_type.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module CustomType
extend T::Sig
extend T::Helpers
abstract!
include Kernel # for `is_a?`
# Alias for backwards compatibility
sig(:final) do
params(
value: BasicObject,
)
.returns(T::Boolean)
.chec... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/generated_code_validation.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/generated_code_validation.rb | # frozen_string_literal: true
# typed: true
module T::Props
# Helper to validate generated code, to mitigate security concerns around
# `class_eval`. Not called by default; the expectation is this will be used
# in a test iterating over all T::Props::Serializable subclasses.
#
# We validate the exact expecte... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/deserializer_generator.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/deserializer_generator.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module Private
# Generates a specialized `deserialize` implementation for a subclass of
# T::Props::Serializable.
#
# The basic idea is that we analyze the props and for each prop, generate
# the simplest possible logic as a block of ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/serializer_generator.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/serializer_generator.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module Private
# Generates a specialized `serialize` implementation for a subclass of
# T::Props::Serializable.
#
# The basic idea is that we analyze the props and for each prop, generate
# the simplest possible logic as a block of Ru... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/setter_factory.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/setter_factory.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module Private
module SetterFactory
extend T::Sig
SetterProc = T.type_alias { T.proc.params(val: T.untyped).void }
ValueValidationProc = T.type_alias { T.proc.params(val: T.untyped).void }
ValidateProc = T.type_alias { T.proc.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/parser.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/parser.rb | # frozen_string_literal: true
# typed: false
module T::Props
module Private
module Parse
def parse(source)
@current_ruby ||= require_parser(:CurrentRuby)
@current_ruby.parse(source)
end
def s(type, *children)
@node ||= require_parser(:AST, :Node)
@node.new(type,... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/apply_default.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/apply_default.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module Private
class ApplyDefault
extend T::Sig
extend T::Helpers
abstract!
# checked(:never) - O(object construction x prop count)
sig { returns(SetterFactory::SetterProc).checked(:never) }
attr_reader :setter_pro... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/serde_transform.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.6.12872/lib/types/props/private/serde_transform.rb | # frozen_string_literal: true
# typed: strict
module T::Props
module Private
module SerdeTransform
extend T::Sig
class Serialize; end
private_constant :Serialize
class Deserialize; end
private_constant :Deserialize
ModeType = T.type_alias { T.any(Serialize, Deserialize) }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
require_relative "public_suffix/domain"
require_relative "public_suffix/version"
require_relative "public_suffix/errors"
require_relative "public_suff... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/version.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/version.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
module PublicSuffix
# @return [String] the current library version
VERSION = "7.0.0"
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/errors.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/errors.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
module PublicSuffix
class Error < StandardError
end
# Raised when trying to parse an invalid name.
# A name is considered invalid when no ru... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/domain.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/domain.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
module PublicSuffix
# Domain represents a domain name, composed by a TLD, SLD and TRD.
class Domain
# Splits a string into the labels, that ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/list.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/list.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
module PublicSuffix
# A {PublicSuffix::List} is a collection of one
# or more {PublicSuffix::Rule}.
#
# Given a {PublicSuffix::List},
# you... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/rule.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/public_suffix-7.0.0/lib/public_suffix/rule.rb | # frozen_string_literal: true
# = Public Suffix
#
# Domain name parser based on the Public Suffix List.
#
# Copyright (c) 2009-2025 Simone Carletti <weppos@weppos.net>
module PublicSuffix
# A Rule is a special object which holds a single definition
# of the Public Suffix List.
#
# There are 3 types of rules,... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata.rb | # BinData -- Binary data manipulator.
# Copyright (c) 2007 - 2025 Dion Mendel.
require 'bindata/version'
require 'bindata/array'
require 'bindata/bits'
require 'bindata/buffer'
require 'bindata/choice'
require 'bindata/count_bytes_remaining'
require 'bindata/delayed_io'
require 'bindata/float'
require 'bindata/int'
re... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/io.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/io.rb | require 'stringio'
module BinData
# A wrapper around an IO object. The wrapper provides a consistent
# interface for BinData objects to use when accessing the IO.
module IO
# Creates a StringIO around +str+.
def self.create_string_io(str = "")
bin_str = str.dup.force_encoding(Encoding::BINARY)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/record.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/record.rb | require 'bindata/dsl'
require 'bindata/struct'
module BinData
# A Record is a declarative wrapper around Struct.
#
# See +Struct+ for more info.
class Record < BinData::Struct
extend DSLMixin
unregister_self
dsl_parser :struct
arg_processor :record
end
class RecordArgProcessor < Struct... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/int.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/int.rb | require 'thread'
require 'bindata/base_primitive'
module BinData
# Defines a number of classes that contain an integer. The integer
# is defined by endian, signedness and number of bytes.
module Int # :nodoc: all
@@mutex = Mutex.new
class << self
def define_class(name, nbits, endian, signed)
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/version.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/version.rb | module BinData
VERSION = '2.5.1'
end
| ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/struct.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/struct.rb | require 'bindata/base'
require 'bindata/delayed_io'
module BinData
class Base
optional_parameter :onlyif, :byte_align # Used by Struct
end
# A Struct is an ordered collection of named data objects.
#
# require 'bindata'
#
# class Tuple < BinData::Record
# int8 :x
# int8 :y
#... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/bits.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/bits.rb | require 'thread'
require 'bindata/base_primitive'
module BinData
# Defines a number of classes that contain a bit based integer.
# The integer is defined by endian and number of bits.
module BitField # :nodoc: all
@@mutex = Mutex.new
class << self
def define_class(name, nbits, endian, signed = :u... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/count_bytes_remaining.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/count_bytes_remaining.rb | require 'bindata/base_primitive'
module BinData
# Counts the number of bytes remaining in the input stream from the current
# position to the end of the stream. This only makes sense for seekable
# streams.
#
# require 'bindata'
#
# class A < BinData::Record
# count_bytes_remaining :bytes_rema... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/section.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/section.rb | require 'bindata/base'
require 'bindata/dsl'
module BinData
# A Section is a layer on top of a stream that transforms the underlying
# data. This allows BinData to process a stream that has multiple
# encodings. e.g. Some data data is compressed or encrypted.
#
# require 'bindata'
#
# class XorTra... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/array.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/array.rb | require 'bindata/base'
require 'bindata/dsl'
module BinData
# An Array is a list of data objects of the same type.
#
# require 'bindata'
#
# data = "\x03\x04\x05\x06\x07\x08\x09"
#
# obj = BinData::Array.new(type: :int8, initial_length: 6)
# obj.read(data) #=> [3, 4, 5, 6, 7, 8]
#
# obj =... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/rest.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/rest.rb | require 'bindata/base_primitive'
module BinData
# Rest will consume the input stream from the current position to the end of
# the stream. This will mainly be useful for debugging and developing.
#
# require 'bindata'
#
# class A < BinData::Record
# string :a, read_length: 5
# rest :rest... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/delayed_io.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/delayed_io.rb | require 'bindata/base'
require 'bindata/dsl'
module BinData
# BinData declarations are evaluated in a single pass.
# However, some binary formats require multi pass processing. A common
# reason is seeking backwards in the input stream.
#
# DelayedIO supports multi pass processing. It works by ignoring the... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/float.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/float.rb | require 'bindata/base_primitive'
module BinData
# Defines a number of classes that contain a floating point number.
# The float is defined by precision and endian.
module FloatingPoint # :nodoc: all
class << self
PRECISION = {
single: 4,
double: 8,
}
PACK_CODE = {
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/registry.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/registry.rb | module BinData
# Raised when #lookup fails.
class UnRegisteredTypeError < StandardError; end
# This registry contains a register of name -> class mappings.
#
# Numerics (integers and floating point numbers) have an endian property as
# part of their name (e.g. int32be, float_le).
#
# Classes can be loo... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/warnings.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/warnings.rb | module BinData
class Base
# Don't override initialize. If you are defining a new kind of datatype
# (list, array, choice etc) then put your initialization code in
# #initialize_instance. BinData objects might be initialized as prototypes
# and your initialization code may not be called.
#
# ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/uint8_array.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/uint8_array.rb | require 'bindata/base_primitive'
module BinData
# Uint8Array is a specialised type of array that only contains
# bytes (Uint8). It is a faster and more memory efficient version
# of `BinData::Array.new(:type => :uint8)`.
#
# require 'bindata'
#
# obj = BinData::Uint8Array.new(initial_length: 5)
# ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/lazy.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/lazy.rb | module BinData
# A LazyEvaluator is bound to a data object. The evaluator will evaluate
# lambdas in the context of this data object. These lambdas
# are those that are passed to data objects as parameters, e.g.:
#
# BinData::String.new(value: -> { %w(a test message).join(" ") })
#
# As a shortcut, :... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/alignment.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/alignment.rb | require 'bindata/base_primitive'
module BinData
# Resets the stream alignment to the next byte. This is
# only useful when using bit-based primitives.
#
# class MyRec < BinData::Record
# bit4 :a
# resume_byte_alignment
# bit4 :b
# end
#
# MyRec.read("\x12\x34") #=> {"a" => ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/dsl.rb | Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/bindata-2.5.1/lib/bindata/dsl.rb | module BinData
# Extracts args for Records and Buffers.
#
# Foo.new(bar: "baz) is ambiguous as to whether :bar is a value or parameter.
#
# BaseArgExtractor always assumes :bar is parameter. This extractor correctly
# identifies it as value or parameter.
module MultiFieldArgSeparator
def separate_arg... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.