Class: UrlStore
- Inherits:
-
Object
- Object
- UrlStore
- Defined in:
- lib/url_store.rb,
lib/url_store/compact_encoder.rb
Defined Under Namespace
Classes: CompactEncoder, InitializerGenerator, Railtie
Constant Summary collapse
- VERSION =
File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
- SECRET =
'asdkasjlwqjdqaccxnjkasdfh2313'
- IN =
(convert to base64url <-> RFC4648) and ‘|’ which is not url-safe if you ask ERB/CGI, but browsers accept it
'+/='
- OUT =
'-_|'
- @@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.
25 26 27 |
# File 'lib/url_store.rb', line 25 def initialize(={}) @options = @@defaults.merge() end |
Class Method Details
.decode(string) ⇒ Object
21 22 23 |
# File 'lib/url_store.rb', line 21 def self.decode(string) new.decode(string) end |
.defaults=(x) ⇒ Object
15 |
# File 'lib/url_store.rb', line 15 def self.defaults=(x); @@defaults=x; end |
.encode(data) ⇒ Object
17 18 19 |
# File 'lib/url_store.rb', line 17 def self.encode(data) new.encode(data) end |