Module: Anthropic::Models::BrowserStateChange
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/browser_state_change.rb,
sig/anthropic/models/browser_state_change.rbs
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::BrowserStateChangeTabOpened, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::BrowserStateChangeTabOpened, Anthropic::Models::BrowserStateChangeDownloadStarted, Anthropic::Models::BrowserStateChangeDownloadCompleted, Anthropic::Models::BrowserStateChangeDownloadFailed)
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Class Method Details
.new(type:, **args) ⇒ Anthropic::Models::BrowserStateChangeTabOpened, ...
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
Some parameter documentations has been truncated, see Anthropic::Models::BrowserStateChange for more details.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/anthropic/models/browser_state_change.rb', line 70 def self.new(type:, **args) case type.to_sym when :tab_opened Anthropic::BrowserStateChangeTabOpened.new(**args) when :download_started Anthropic::BrowserStateChangeDownloadStarted.new(**args) when :download_completed Anthropic::BrowserStateChangeDownloadCompleted.new(**args) when :download_failed Anthropic::BrowserStateChangeDownloadFailed.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/browser_state_change.rb', line 39
|
.variants ⇒ Array(Anthropic::Models::BrowserStateChangeTabOpened, Anthropic::Models::BrowserStateChangeDownloadStarted, Anthropic::Models::BrowserStateChangeDownloadCompleted, Anthropic::Models::BrowserStateChangeDownloadFailed)
|
|
# File 'lib/anthropic/models/browser_state_change.rb', line 43
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::browser_state_change]
26 |
# File 'sig/anthropic/models/browser_state_change.rbs', line 26 def self?.variants: -> ::Array[Anthropic::Models::browser_state_change] |