Class: Pione::System::DomainDump
- Inherits:
-
StructX
- Object
- StructX
- Pione::System::DomainDump
- Defined in:
- lib/pione/system/domain-dump.rb
Overview
DomainDump
is a class that dumps domain environment as a file for
exporting the environment from PIONE world to externals.
Constant Summary collapse
- FILENAME =
".domain.dump"
Class Method Summary collapse
-
.load(location) ⇒ DomainDump
Load the domain dump file.
Instance Method Summary collapse
-
#write(location) ⇒ Object
Write a domain dump file.
Class Method Details
.load(location) ⇒ DomainDump
Load the domain dump file.
14 15 16 17 18 19 20 |
# File 'lib/pione/system/domain-dump.rb', line 14 def self.load(location) if location.directory? location = location + FILENAME end new(Marshal.load(location.read)) end |
Instance Method Details
#write(location) ⇒ Object
Write a domain dump file.
25 26 27 28 29 30 31 |
# File 'lib/pione/system/domain-dump.rb', line 25 def write(location) if location.directory? location = location + ".domain.dump" end location.write(Marshal.dump(env.dumpable)) end |