Class: Daytona::ComputerUse::ScreenshotRegion

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/computer_use.rb

Overview

Region coordinates for screenshot operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:, width:, height:) ⇒ ScreenshotRegion

Returns a new instance of ScreenshotRegion.

Parameters:

  • x (Integer)

    X coordinate of the region

  • y (Integer)

    Y coordinate of the region

  • width (Integer)

    Width of the region

  • height (Integer)

    Height of the region



382
383
384
385
386
387
# File 'lib/daytona/computer_use.rb', line 382

def initialize(x:, y:, width:, height:) # rubocop:disable Naming/MethodParameterName
  @x = x
  @y = y
  @width = width
  @height = height
end

Instance Attribute Details

#heightInteger

Returns Height of the region.

Returns:

  • (Integer)

    Height of the region



376
377
378
# File 'lib/daytona/computer_use.rb', line 376

def height
  @height
end

#widthInteger

Returns Width of the region.

Returns:

  • (Integer)

    Width of the region



373
374
375
# File 'lib/daytona/computer_use.rb', line 373

def width
  @width
end

#xInteger

Returns X coordinate of the region.

Returns:

  • (Integer)

    X coordinate of the region



367
368
369
# File 'lib/daytona/computer_use.rb', line 367

def x
  @x
end

#yInteger

Returns Y coordinate of the region.

Returns:

  • (Integer)

    Y coordinate of the region



370
371
372
# File 'lib/daytona/computer_use.rb', line 370

def y
  @y
end