123456789_123456789_123456789_123456789_123456789_

Module: Selenium::WebDriver::HTML5::SharedWebStorage

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, Enumerable
Defined in: rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#empty?Boolean (readonly)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 39

def empty?
  to_a.empty?
end

Instance Method Details

#each

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 43

def each
  return enum_for(:each) unless block_given?

  keys.each do |k|
    yield k, self[k]
  end
end

#fetch(key)

Raises:

  • (KeyError)
[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 32

def fetch(key)
  return self[key] if key? key
  return yield(key) if block_given?

  raise KeyError, "missing key #{key.inspect}"
end

#has_key?(key)

Alias for #key?.

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 30

alias has_key? key?

#key?(key) ⇒ Boolean Also known as: #member?, #has_key?

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 26

def key?(key)
  keys.include? key
end

#member?(key)

Alias for #key?.

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/html5/shared_web_storage.rb', line 29

alias member? key?