123456789_123456789_123456789_123456789_123456789_

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

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/capybara/selenium/extensions/modifier_keys_stack.rb

Class Method Summary

Instance Method Summary

Constructor Details

.newModifierKeysStack

[ GitHub ]

  
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 8

def initialize
  @stack = []
end

Instance Method Details

#include?(key) ⇒ Boolean

[ GitHub ]

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

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

#pop

[ GitHub ]

  
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 24

def pop
  @stack.pop
end

#press(key)

[ GitHub ]

  
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 16

def press(key)
  @stack.last.push(key)
end

#push

[ GitHub ]

  
# File 'lib/capybara/selenium/extensions/modifier_keys_stack.rb', line 20

def push
  @stack.push []
end