Class: ClWiki::UserBase

Inherits:
Object
  • Object
show all
Defined in:
lib/cl_wiki/user_base.rb

Direct Known Subclasses

PublicUser, User

Instance Method Summary collapse

Instance Method Details

#can_encrypt?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/cl_wiki/user_base.rb', line 11

def can_encrypt?
  false
end

#encryption_keyObject



21
22
23
# File 'lib/cl_wiki/user_base.rb', line 21

def encryption_key
  raise 'Subclass must implement'
end

#lockboxObject



15
16
17
18
19
# File 'lib/cl_wiki/user_base.rb', line 15

def lockbox
  raise 'User cannot encrypt?' unless can_encrypt?

  Lockbox.new(key: encryption_key)
end

#nameObject



7
8
9
# File 'lib/cl_wiki/user_base.rb', line 7

def name
  raise 'Subclass must implement'
end