Class: UrlStore
- Inherits:
-
Object
- Object
- UrlStore
- Defined in:
- lib/url_store.rb,
lib/url_store/version.rb,
lib/url_store/compact_encoder.rb
Defined Under Namespace
Classes: CompactEncoder, InitializerGenerator, Railtie
Constant Summary collapse
- SECRET =
'asdkasjlwqjdqaccxnjkasdfh2313'
- IN =
(convert to base64url <-> RFC4648) and ‘|’ which is not url-safe if you ask ERB/CGI, but browsers accept it
'+/='
- OUT =
'-_|'
- VERSION =
Version = '0.3.4'
- @@defaults =
{}
Class Method Summary collapse
Instance Method Summary collapse
- #decode(string) ⇒ Object
- #encode(data) ⇒ Object
-
#initialize(options = {}) ⇒ UrlStore
constructor
A new instance of UrlStore.
Constructor Details
#initialize(options = {}) ⇒ UrlStore
Returns a new instance of UrlStore.
24 25 26 |
# File 'lib/url_store.rb', line 24 def initialize(={}) @options = @@defaults.merge() end |
Class Method Details
.decode(string) ⇒ Object
20 21 22 |
# File 'lib/url_store.rb', line 20 def self.decode(string) new.decode(string) end |
.defaults=(x) ⇒ Object
14 |
# File 'lib/url_store.rb', line 14 def self.defaults=(x); @@defaults=x; end |
.encode(data) ⇒ Object
16 17 18 |
# File 'lib/url_store.rb', line 16 def self.encode(data) new.encode(data) end |