Class: Anthropic::Models::BrowserCoordinateTarget

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/browser_coordinate_target.rb,
sig/anthropic/models/browser_coordinate_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(x:, y_:, type: :coordinate) ⇒ BrowserCoordinateTarget

A point in the browser viewport, in viewport pixels (the same frame as a full-viewport screenshot).

Parameters:

  • x (Integer) —

    Pixels from the left edge of the viewport.

  • y_ (Integer) —

    Pixels from the top edge of the viewport.

  • type (Symbol, :coordinate) (defaults to: :coordinate)
  • x: (Integer)
  • y_: (Integer)
  • type: (:coordinate) (defaults to: :coordinate)


# File 'lib/anthropic/models/browser_coordinate_target.rb', line 23

Instance Attribute Details

#type ⇒ Symbol, :coordinate

Parameters:

  • value (:coordinate)

Returns:

  • (Symbol, :coordinate)


9
# File 'lib/anthropic/models/browser_coordinate_target.rb', line 9

required :type, const: :coordinate

#x ⇒ Integer

Pixels from the left edge of the viewport.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


15
# File 'lib/anthropic/models/browser_coordinate_target.rb', line 15

required :x, Integer

#y_ ⇒ Integer

Pixels from the top edge of the viewport.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


21
# File 'lib/anthropic/models/browser_coordinate_target.rb', line 21

required :y_, Integer, api_name: :y

Instance Method Details

#to_hash ⇒ { type: :coordinate, x: Integer, y_: Integer }

Returns:

  • ({ type: :coordinate, x: Integer, y_: Integer })


15
# File 'sig/anthropic/models/browser_coordinate_target.rbs', line 15

def to_hash: -> { type: :coordinate, x: Integer, y_: Integer }