Class: Capybara::Selenium::Node::ModifierKeysStack Private
- Inherits:
-
Object
- Object
- Capybara::Selenium::Node::ModifierKeysStack
- Defined in:
- lib/capybara/selenium/extensions/modifier_keys_stack.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #include?(key) ⇒ Boolean private
-
#initialize ⇒ ModifierKeysStack
constructor
private
A new instance of ModifierKeysStack.
- #pop ⇒ Object private
- #press(key) ⇒ Object private
- #push ⇒ Object private
Constructor Details
#initialize ⇒ ModifierKeysStack
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ModifierKeysStack.
8 9 10 |
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 8 def initialize @stack = [] end |
Instance Method Details
#include?(key) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 12 def include?(key) @stack.flatten.include?(key) end |
#pop ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 24 def pop @stack.pop end |
#press(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 16 def press(key) @stack.last.push(key) end |
#push ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 20 def push @stack.push [] end |