Class: CloudKit::UserStore
Overview
A thin layer on top of CloudKit::Store providing consistent URIs and automatic schema upgrades if required for future releases.
Constant Summary collapse
- @@store =
nil
Instance Method Summary collapse
-
#delete(uri, options = {}) ⇒ Object
:nodoc:.
-
#get(uri, options = {}) ⇒ Object
:nodoc:.
-
#initialize(uri = nil) ⇒ UserStore
constructor
A new instance of UserStore.
-
#post(uri, options = {}) ⇒ Object
:nodoc:.
-
#put(uri, options = {}) ⇒ Object
:nodoc:.
-
#resolve_uris(uris) ⇒ Object
:nodoc:.
-
#version ⇒ Object
Return the version for this UserStore.
Constructor Details
#initialize(uri = nil) ⇒ UserStore
Returns a new instance of UserStore.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cloudkit/user_store.rb', line 8 def initialize(uri=nil) unless @@store login_view = ExtractionView.new( :cloudkit_login_view, :observe => :cloudkit_users, :extract => [:identity_url, :remember_me_token, :remember_me_expiration]) @@store = Store.new( :collections => [:cloudkit_users], :views => [login_view], :adapter => SQLAdapter.new(uri)) end end |
Instance Method Details
#delete(uri, options = {}) ⇒ Object
:nodoc:
33 34 35 |
# File 'lib/cloudkit/user_store.rb', line 33 def delete(uri, ={}) #:nodoc: @@store.delete(uri, ) end |
#get(uri, options = {}) ⇒ Object
:nodoc:
21 22 23 |
# File 'lib/cloudkit/user_store.rb', line 21 def get(uri, ={}) #:nodoc: @@store.get(uri, ) end |
#post(uri, options = {}) ⇒ Object
:nodoc:
25 26 27 |
# File 'lib/cloudkit/user_store.rb', line 25 def post(uri, ={}) #:nodoc: @@store.post(uri, ) end |
#put(uri, options = {}) ⇒ Object
:nodoc:
29 30 31 |
# File 'lib/cloudkit/user_store.rb', line 29 def put(uri, ={}) #:nodoc: @@store.put(uri, ) end |
#resolve_uris(uris) ⇒ Object
:nodoc:
37 38 39 |
# File 'lib/cloudkit/user_store.rb', line 37 def resolve_uris(uris) #:nodoc: @@store.resolve_uris(uris) end |
#version ⇒ Object
Return the version for this UserStore
42 |
# File 'lib/cloudkit/user_store.rb', line 42 def version; 1; end |