Class: Anthropic::Models::BrowserRefTarget

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/browser_ref_target.rb,
sig/anthropic/models/browser_ref_target.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(ref:, type: :ref) ⇒ BrowserRefTarget

An element on the page, identified by a reference from a prior read_page or find result. References are scoped to the tab that produced them and become stale after navigation or a major re-render.

Some parameter documentations has been truncated, see Anthropic::Models::BrowserRefTarget for more details.

Parameters:

  • ref (String) —

    An element reference (e.g. "ref_7") returned by a prior read_page or find re

  • type (Symbol, :ref) (defaults to: :ref)
  • ref: (String)
  • type: (:ref) (defaults to: :ref)


# File 'lib/anthropic/models/browser_ref_target.rb', line 18

Instance Attribute Details

#ref ⇒ String

An element reference (e.g. "ref_7") returned by a prior read_page or find result.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/anthropic/models/browser_ref_target.rb', line 11

required :ref, String

#type ⇒ Symbol, :ref

Parameters:

  • value (:ref)

Returns:

  • (Symbol, :ref)


16
# File 'lib/anthropic/models/browser_ref_target.rb', line 16

required :type, const: :ref

Instance Method Details

#to_hash ⇒ { ref: String, type: :ref }

Returns:

  • ({ ref: String, type: :ref })


12
# File 'sig/anthropic/models/browser_ref_target.rbs', line 12

def to_hash: -> { ref: String, type: :ref }