Class: Rucoa::DefinitionArchiver
- Inherits:
-
Object
- Object
- Rucoa::DefinitionArchiver
- Defined in:
- lib/rucoa/definition_archiver.rb
Class Method Summary collapse
Class Method Details
.dump(definitions) ⇒ void
This method returns an undefined value.
13 14 15 16 17 18 19 |
# File 'lib/rucoa/definition_archiver.rb', line 13 def dump(definitions) pathname = ::Pathname.new(RUBY_DEFINITIONS_DUMP_PATH) pathname.parent.mkpath pathname.write( ::Marshal.dump(definitions) ) end |
.load ⇒ Array<Rucoa::Definition::Base>
22 23 24 25 26 |
# File 'lib/rucoa/definition_archiver.rb', line 22 def load ::Marshal.load( ::File.binread(RUBY_DEFINITIONS_DUMP_PATH) ) end |