Class: YiffSpace::Auth::AuthInfo::Anonymous
- Inherits:
-
Object
- Object
- YiffSpace::Auth::AuthInfo::Anonymous
- Includes:
- Singleton
- Defined in:
- lib/yiffspace/auth/auth_info/anonymous.rb
Class Method Summary collapse
Instance Method Summary collapse
- #anonymous? ⇒ Boolean
- #blank? ⇒ Boolean
- #entitlements ⇒ Object
- #has_permission? ⇒ Boolean
- #permissions ⇒ Object
-
#present? ⇒ Boolean
this feels wrong, but it hopefully shouldn’t break anything.
- #roles ⇒ Object
- #serializable_hash ⇒ Object
- #to_session ⇒ Object
Class Method Details
.from_json ⇒ Object
52 53 54 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 52 def self.from_json(*) Anonymous.new end |
.from_session(data) ⇒ Object
56 57 58 59 60 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 56 def self.from_session(data) return nil if data.blank? from_json(data) end |
Instance Method Details
#anonymous? ⇒ Boolean
31 32 33 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 31 def anonymous? true end |
#blank? ⇒ Boolean
40 41 42 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 40 def blank? true end |
#entitlements ⇒ Object
15 16 17 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 15 def entitlements [] end |
#has_permission? ⇒ Boolean
27 28 29 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 27 def (*) false end |
#permissions ⇒ Object
23 24 25 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 23 def Permissions.new([]) end |
#present? ⇒ Boolean
this feels wrong, but it hopefully shouldn’t break anything
36 37 38 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 36 def present? false end |
#roles ⇒ Object
19 20 21 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 19 def roles [] end |
#serializable_hash ⇒ Object
44 45 46 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 44 def serializable_hash(*) nil end |
#to_session ⇒ Object
48 49 50 |
# File 'lib/yiffspace/auth/auth_info/anonymous.rb', line 48 def to_session serializable_hash end |