lib/document.rb
# Saves the document metadata to (doc-dir)/metadata.json
# This metadata is just the {#to_hash}, as JSON, and is intended for access by client
# applications. It is not used by Colore for anything.
Saves the document metadata to (doc-dir)/metadata.json
This metadata is just the {#to_hash}, as JSON, and is intended for access by client
applications. It is not used by Colore for anything.
Saves the document metadata to ( doc - dir ) / metadata . json This metadata is just the { #to_hash } as JSON and is intended for access by client applications . It is not used by Colore for anything .
def save_metadata
      File.open( directory + 'metadata.json', "w" ) do |f|
        f.puts JSON.pretty_generate(to_hash)
      end
    end
def save_metadata File . open ( directory + 'metadata.json' , "w" ) do | f | f . puts JSON . pretty_generate ( to_hash ) end end
Saves the document metadata to (doc-dir)/metadata.json
This metadata is just the {#to_hash}, as JSON, and is intended for access by client
applications.
Saves the document metadata to ( doc - dir ) / metadata . json This metadata is just the { #to_hash } as JSON and is intended for access by client applications .