Class: LocalStorage
- Inherits:
-
Object
- Object
- LocalStorage
- Defined in:
- src/ruby/platform_specific/web.rb
Overview
A class for interacting with the browser’s LocalStorage
Class Method Summary collapse
-
.get_item(key) ⇒ String
Returns the value stored in localStorage in the browser, if it doesn’t exist it will just return an empty string.
-
.set_item(key, value) ⇒ nil
Sets the value in localStorage in the browser.
Class Method Details
.get_item(key) ⇒ String
Returns the value stored in localStorage in the browser, if it doesn’t exist it will just return an empty string
18 19 20 |
# File 'src/ruby/platform_specific/web.rb', line 18 def self.get_item(key) raise PlatformSpecificMethodCalledOnWrongPlatformError, 'LocalStorage.get_item is only available for Web exports' end |
.set_item(key, value) ⇒ nil
Sets the value in localStorage in the browser
27 28 29 |
# File 'src/ruby/platform_specific/web.rb', line 27 def self.set_item(key, value) raise PlatformSpecificMethodCalledOnWrongPlatformError, 'LocalStorage.set_item is only available for Web exports' end |