Class: Capybara::Selenium::Node::ModifierKeysStack Private

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeModifierKeysStack

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.

Returns:

  • (Boolean)

12
13
14
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 12

def include?(key)
  @stack.flatten.include?(key)
end

#popObject

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

#pushObject

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