Skip to content

Commit 8bf63e7

Browse files
committed
[rb] add class documentation and set api private all Interactions classes
1 parent ab4e010 commit 8bf63e7

11 files changed

Lines changed: 68 additions & 1 deletion

File tree

rb/lib/selenium/webdriver/common/interactions/input_device.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
module Selenium
2323
module WebDriver
2424
module Interactions
25+
#
26+
# Superclass for the input device sources
27+
# Manages Array of Interaction instances for the device
28+
#
29+
# @api private
30+
#
31+
2532
class InputDevice
2633
attr_reader :name, :actions
2734

rb/lib/selenium/webdriver/common/interactions/interaction.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Superclass for classes defining actions
25+
# Do not initialize directly, only use subclass
26+
#
27+
# @api private
28+
#
29+
2330
class Interaction
2431
attr_reader :type
2532

rb/lib/selenium/webdriver/common/interactions/interactions.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ module Interactions
2323
KEY = :key
2424
POINTER = :pointer
2525
NONE = :none
26-
SOURCE_TYPES = [KEY, POINTER, NONE].freeze
26+
27+
#
28+
# Class methods for initializing known Input devices
29+
#
2730

2831
class << self
2932
def key(name)

rb/lib/selenium/webdriver/common/interactions/key_input.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Creates actions specific to Key Input devices
25+
#
26+
# @api private
27+
#
28+
2329
class KeyInput < InputDevice
2430
SUBTYPES = {down: :keyDown, up: :keyUp, pause: :pause}.freeze
2531

rb/lib/selenium/webdriver/common/interactions/none_input.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Creates actions specific to null input source
25+
# This is primarily used for adding pauses
26+
#
27+
# @api private
28+
#
29+
2330
class NoneInput < InputDevice
2431
def type
2532
Interactions::NONE

rb/lib/selenium/webdriver/common/interactions/pause.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Action to create a waiting period between actions
25+
# Also used for synchronizing actions across devices
26+
#
27+
# @api private
28+
#
29+
2330
class Pause < Interaction
2431
def initialize(source, duration = nil)
2532
super(source)

rb/lib/selenium/webdriver/common/interactions/pointer_cancel.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Action to cancel any other Pointer Action.
25+
#
26+
# @api private
27+
#
28+
2329
class PointerCancel < Interaction
2430
def initialize(source)
2531
super(source)

rb/lib/selenium/webdriver/common/interactions/pointer_input.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Creates actions specific to Pointer Input devices
25+
#
26+
# @api private
27+
#
28+
2329
class PointerInput < InputDevice
2430
KIND = {mouse: :mouse, pen: :pen, touch: :touch}.freeze
2531

rb/lib/selenium/webdriver/common/interactions/pointer_move.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Actions related to moving the pointer.
25+
#
26+
# @api private
27+
#
28+
2329
class PointerMove < Interaction
2430
VIEWPORT = :viewport
2531
POINTER = :pointer

rb/lib/selenium/webdriver/common/interactions/pointer_press.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
module Selenium
2121
module WebDriver
2222
module Interactions
23+
#
24+
# Actions related to clicking, tapping or pressing the pointer.
25+
#
26+
# @api private
27+
#
28+
2329
class PointerPress < Interaction
2430
BUTTONS = {left: 0, middle: 1, right: 2}.freeze
2531
DIRECTIONS = {down: :pointerDown, up: :pointerUp}.freeze

0 commit comments

Comments
 (0)