Module: FinchAPI::Internal::Util::SorbetRuntimeSupport Private
- Included in:
- FinchAPI::Internal, Transport::BaseClient, Transport::PooledNetRequester, Type::BaseModel, Type::Converter, Type::Enum, Type::Union, FinchAPI::Internal::Util
- Defined in:
- lib/finch_api/internal/util.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: MissingSorbetRuntimeError
Instance Method Summary collapse
Instance Method Details
#const_missing(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
818 819 820 821 822 823 824 825 826 827 |
# File 'lib/finch_api/internal/util.rb', line 818 def const_missing(name) super unless sorbet_runtime_constants.key?(name) unless Object.const_defined?(:T) = "Trying to access a Sorbet constant #{name.inspect} without `sorbet-runtime`." raise MissingSorbetRuntimeError.new() end sorbet_runtime_constants.fetch(name).call end |
#define_sorbet_constant!(name, &blk) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
833 |
# File 'lib/finch_api/internal/util.rb', line 833 def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk) |