Class: HipTail::MemoryAuthorityProvider
- Inherits:
-
AuthorityProvider
- Object
- AuthorityProvider
- HipTail::MemoryAuthorityProvider
- Defined in:
- lib/hiptail/authority/provider.rb
Instance Method Summary collapse
- #get(oauth_id) ⇒ HipTail::Authority
- #initialize ⇒ HipTail::MemoryAuthorityProvider constructor
- #register(oauth_id, authority) ⇒ HipTail::Authority
- #unregister(oauth_id) ⇒ void
Methods inherited from AuthorityProvider
Constructor Details
#initialize ⇒ HipTail::MemoryAuthorityProvider
42 43 44 |
# File 'lib/hiptail/authority/provider.rb', line 42 def initialize @authorities = {} end |
Instance Method Details
#get(oauth_id) ⇒ HipTail::Authority
48 49 50 |
# File 'lib/hiptail/authority/provider.rb', line 48 def get(oauth_id) @authorities[oauth_id] end |
#register(oauth_id, authority) ⇒ HipTail::Authority
55 56 57 |
# File 'lib/hiptail/authority/provider.rb', line 55 def register(oauth_id, ) @authorities[oauth_id] = end |
#unregister(oauth_id) ⇒ void
This method returns an undefined value.
61 62 63 |
# File 'lib/hiptail/authority/provider.rb', line 61 def unregister(oauth_id) @authorities.delete(oauth_id) end |