Class: Avm::Instances::Data::Unit
Instance Method Summary
collapse
#dump_path_extension, #dump_to_directory, #installation_files_data, #load_from_directory
Methods inherited from Data::Unit
#clear, #dump, #name
Instance Method Details
#check_load_permission! ⇒ void
This method returns an undefined value.
15
16
17
18
19
|
# File 'lib/avm/instances/data/unit.rb', line 15
def check_load_permission!
return if instance.data_allow_loading
raise ::Avm::Instances::Data::LoadingDeniedError, "Instance: #{instance}"
end
|
#data_default_dump_path ⇒ Pathname
22
23
24
25
26
|
# File 'lib/avm/instances/data/unit.rb', line 22
def data_default_dump_path
instance.data_default_dump_path.to_pathname.basename_sub('.*') do |b|
"#{b}_#{identifier}#{dump_path_extension}"
end
end
|
#identifier ⇒ String
29
30
31
|
# File 'lib/avm/instances/data/unit.rb', line 29
def identifier
instance.data_package.units.key(self) || raise("No identifier found for #{self}")
end
|
#load ⇒ Object
33
34
35
36
|
# File 'lib/avm/instances/data/unit.rb', line 33
def load(...)
check_load_permission!
instance.on_disabled_processes { super }
end
|