spec/writer_spec.rb
# Serialize ntstr to a string and compare against regexps
Serialize ntstr to a string and compare against regexps
Serialize ntstr to a string and compare against regexps
def serialize(ntstr, **options)
      g = ntstr.is_a?(RDF::Enumerable) ? ntstr : parse(ntstr, format: :ntriples, validate: false, logger: [])
      logger.info "serialized: #{ntstr}"
      result = RDF::RDFXML::Writer.buffer(
        logger:   logger,
        standard_prefixes: true,
        encoding: Encoding::UTF_8,
        **options
      ) do |writer|
        writer << g
      end
      require 'cgi'
      puts CGI.escapeHTML(result) if $verbose
      result
    end
def serialize ( ntstr , ** options ) g = ntstr . is_a? ( RDF :: Enumerable ) ? ntstr : parse ( ntstr , format : :ntriples , validate : false , logger : [ ] ) logger . info "serialized: #{ntstr}" result = RDF :: RDFXML :: Writer . buffer ( logger : logger , standard_prefixes : true , encoding : Encoding :: UTF_8 , ** options ) do | writer | writer << g end require 'cgi' puts CGI . escapeHTML ( result ) if $verbose result end
Serialize ntstr to a string and compare against regexps
Serialize ntstr to a string and compare against regexps
ntstr
<not_specific>
options
<not_specific>