Module: Pione::System
- Defined in:
- lib/pione/system.rb,
lib/pione/system/init.rb,
lib/pione/system/common.rb,
lib/pione/system/object.rb,
lib/pione/system/status.rb,
lib/pione/system/file-cache.rb,
lib/pione/system/normalizer.rb,
lib/pione/system/domain-dump.rb,
lib/pione/system/package-cache.rb,
lib/pione/system/system-exception.rb
Defined Under Namespace
Modules: FileCache, Normalizer Classes: DomainDump, DomainDumpErro, Init, PackageCache, PioneBug, PioneObject, Status, SystemError
Class Method Summary collapse
-
.finalize ⇒ void
Starts finalization process for PIONE system.
-
.set_signal_trap ⇒ void
Sets signal trap for the system.
Instance Method Summary collapse
-
#temporary_path(filename) ⇒ Pathname
Return temporary path of the file.
Class Method Details
.finalize ⇒ void
This method returns an undefined value.
Starts finalization process for PIONE system. It collects all pione objects from object space and finalize it.
6 7 8 9 10 11 |
# File 'lib/pione/system/common.rb', line 6 def finalize # finalize all innocent white objects ObjectSpace.each_object(PioneObject) do |obj| obj.finalize end end |
.set_signal_trap ⇒ void
This method returns an undefined value.
Sets signal trap for the system.
16 17 18 19 |
# File 'lib/pione/system/common.rb', line 16 def set_signal_trap finalizer = Proc.new { finalize } Signal.trap(:INT, finalizer) end |
Instance Method Details
#temporary_path(filename) ⇒ Pathname
Return temporary path of the file.
28 29 30 |
# File 'lib/pione/system/common.rb', line 28 def temporary_path(filename) Global.temporary_directory + filename end |