Class: Applitools::MouseTrigger
- Inherits:
-
Object
- Object
- Applitools::MouseTrigger
- Defined in:
- lib/eyes_selenium_ruby/eyes/mouse_trigger.rb
Constant Summary collapse
- MouseAction =
{ click: 1, right_click: 2, double_click: 3, move: 4, down: 5, up: 6 }
Instance Attribute Summary collapse
-
#control ⇒ Object
readonly
Returns the value of attribute control.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#mouse_action ⇒ Object
readonly
Returns the value of attribute mouse_action.
Instance Method Summary collapse
-
#initialize(mouse_action, control, location) ⇒ MouseTrigger
constructor
A new instance of MouseTrigger.
- #to_hash ⇒ Object
Constructor Details
#initialize(mouse_action, control, location) ⇒ MouseTrigger
Returns a new instance of MouseTrigger.
7 8 9 10 11 |
# File 'lib/eyes_selenium_ruby/eyes/mouse_trigger.rb', line 7 def initialize(mouse_action, control, location) @mouse_action = MouseAction[mouse_action] @control = control @location = location end |
Instance Attribute Details
#control ⇒ Object (readonly)
Returns the value of attribute control.
5 6 7 |
# File 'lib/eyes_selenium_ruby/eyes/mouse_trigger.rb', line 5 def control @control end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/eyes_selenium_ruby/eyes/mouse_trigger.rb', line 5 def location @location end |
#mouse_action ⇒ Object (readonly)
Returns the value of attribute mouse_action.
5 6 7 |
# File 'lib/eyes_selenium_ruby/eyes/mouse_trigger.rb', line 5 def mouse_action @mouse_action end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 |
# File 'lib/eyes_selenium_ruby/eyes/mouse_trigger.rb', line 13 def to_hash { "$type" => "Applitools.Models.MouseTrigger, Core", mouseAction: mouse_action, control: control.to_hash, location: Hash[location.each_pair.to_a] } end |