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

Version Path
coderay-0.4.3.48 ./demo/demo_dump.rb
coderay-0.5.0.100 ./demo/demo_dump.rb
coderay-0.7.2.168 ./demo/demo_dump.rb
coderay-0.7.2.165 ./demo/demo_dump.rb
coderay-0.7.1.147 ./demo/demo_dump.rb
coderay-0.4.5.73 ./demo/demo_dump.rb
coderay-0.5.0.115 ./demo/demo_dump.rb
coderay-0.5.0.121 ./demo/demo_dump.rb
coderay-0.7.2.176 ./demo/demo_dump.rb