Module: Avm::Instances::Base::AutoValues::Filesystem
- Defined in:
- lib/avm/instances/base/auto_values/filesystem.rb
Instance Method Summary collapse
- #auto_data_fs_path ⇒ Object
- #auto_fs_path ⇒ Object
- #auto_fs_url ⇒ Object
- #auto_fs_url_with_install ⇒ Object
- #auto_fs_url_without_install ⇒ Object
Instance Method Details
#auto_data_fs_path ⇒ Object
15 16 17 18 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 15 def auto_data_fs_path inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id } end |
#auto_fs_path ⇒ Object
10 11 12 13 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 10 def auto_fs_path inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, ::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id } end |
#auto_fs_url ⇒ Object
20 21 22 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 20 def auto_fs_url auto_fs_url_with_install || auto_fs_url_without_install end |
#auto_fs_url_with_install ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 24 def auto_fs_url_with_install read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL) .if_present do |install_url| read_entry_optional('fs_path').if_present do |fs_path| "#{install_url}#{fs_path}" end end end |
#auto_fs_url_without_install ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/avm/instances/base/auto_values/filesystem.rb', line 33 def auto_fs_url_without_install return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present? read_entry_optional('fs_path').if_present do |fs_path| "file://#{fs_path}" end end |