Class: CryptReboot::CryptTab::Entry
- Inherits:
-
Object
- Object
- CryptReboot::CryptTab::Entry
- Defined in:
- lib/crypt_reboot/crypt_tab/entry.rb
Overview
Value-object describing entry in crypttab file
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#key_file ⇒ Object
readonly
Returns the value of attribute key_file.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
Instance Attribute Details
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
7 8 9 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 7 def flags @flags end |
#key_file ⇒ Object (readonly)
Returns the value of attribute key_file.
7 8 9 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 7 def key_file @key_file end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 7 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 7 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
7 8 9 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 7 def target @target end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 12 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 9 def ==(other) target == other.target && source == other.source && key_file == other.key_file && == other. && flags.sort == other.flags.sort end |
#headevice(header_prefix: nil) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/crypt_reboot/crypt_tab/entry.rb', line 14 def headevice(header_prefix: nil) if header_prefix && header_path File.join(header_prefix, header_path) elsif header_path header_path else source end end |