Sha256: e6f92f438b50bed8bf7f756d6e07eaf7eaa6e18cd72734ce32a82324b2f8f37a
Contents?: true
Size: 318 Bytes
Versions: 9
Compression:
Stored size: 318 Bytes
Contents
require 'coderay' # scan some code tokens = CodeRay.scan(File.read($0), :ruby) # dump using YAML yaml = tokens.yaml puts 'YAML: %4d bytes' % yaml.size # dump using Marshal dump = tokens.dump(0) puts 'Dump: %4d bytes' % dump.size # undump and encode puts 'undumped:', dump.undump.div(:css => :class)
Version data entries
9 entries across 9 versions & 1 rubygems