Skip to content

Commit 5934456

Browse files
pftgclaude
andcommitted
fix: correct crop/skip_area YARD docs to edge coordinates
DSL docs said [x, y, width, height] but AreaCalculator uses Region.from_edge_coordinates which takes [left, top, right, bottom]. Fixed to match the actual implementation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b49d0b3 commit 5934456

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/capybara_screenshot_diff

lib/capybara_screenshot_diff/dsl.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def screenshot_group(name)
3838
# @param options [Hash] Additional options for taking the screenshot and comparison.
3939
# @option options [Boolean] :delayed (Capybara::Screenshot::Diff.delayed)
4040
# Whether to validate the screenshot immediately or delay validation.
41-
# @option options [Array<Integer>] :crop [x, y, width, height] Area to crop the screenshot to.
42-
# @option options [Array<Array<Integer>>] :skip_area Array of [x, y, width, height] areas to ignore.
41+
# @option options [Array<Integer>] :crop [left, top, right, bottom] Edge coordinates to crop the screenshot to.
42+
# @option options [Array<Array<Integer>>] :skip_area Array of [left, top, right, bottom] edge coordinates to ignore.
4343
# @option options [Numeric] :tolerance (0.001 for :vips driver) Color tolerance for comparison.
4444
# @option options [Numeric] :color_distance_limit Maximum allowed color distance between pixels.
4545
# @option options [Numeric] :shift_distance_limit Maximum allowed shift distance for pixels.

0 commit comments

Comments
 (0)