Class: UnixUserManager::File::Shadow
- Inherits:
-
Base
- Object
- Base
- UnixUserManager::File::Shadow
show all
- Defined in:
- lib/unix_user_manager/file/shadow.rb
Instance Attribute Summary
Attributes inherited from Base
#data, #new_records, #source
Instance Method Summary
collapse
Methods inherited from Base
#all, #build, #can_add?, #exist?, #initialize
Instance Method Details
#add(name:) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/unix_user_manager/file/shadow.rb', line 7
def add(name:)
return false unless can_add?(name)
@new_records[name] = { id: nil }
true
end
|
#build_new_records ⇒ Object
14
15
16
|
# File 'lib/unix_user_manager/file/shadow.rb', line 14
def build_new_records
@new_records.map { |name, _| "#{name}:!!:::::::" }.join("\n")
end
|
#find(*arg) ⇒ Object
3
|
# File 'lib/unix_user_manager/file/shadow.rb', line 3
def find(*arg); raise NotImplementedError; end
|
#find_by_id(*arg) ⇒ Object
4
|
# File 'lib/unix_user_manager/file/shadow.rb', line 4
def find_by_id(*arg); raise NotImplementedError; end
|
#id_exist?(*arg) ⇒ Boolean
5
|
# File 'lib/unix_user_manager/file/shadow.rb', line 5
def id_exist?(*arg); false end
|
#ids(*arg) ⇒ Object
2
|
# File 'lib/unix_user_manager/file/shadow.rb', line 2
def ids(*arg); raise NotImplementedError; end
|