Class: Kafo::ParserCacheWriter
- Inherits:
-
Object
- Object
- Kafo::ParserCacheWriter
- Defined in:
- lib/kafo/parser_cache_writer.rb
Class Method Summary collapse
Class Method Details
.write(modules) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/kafo/parser_cache_writer.rb', line 3 def self.write(modules) { :version => 1, :files => Hash[modules.sort.map { |m| write_module(m) }] } end |
.write_module(mod) ⇒ Object
10 11 12 |
# File 'lib/kafo/parser_cache_writer.rb', line 10 def self.write_module(mod) [mod.identifier, {:data => mod.raw_data, :mtime => File.mtime(mod.manifest_path).to_i}] end |