lib/rdf/vocab/extensions.rb in rdf-vocab-3.0.14 vs lib/rdf/vocab/extensions.rb in rdf-vocab-3.1.0

- old
+ new

@@ -445,17 +445,17 @@ super.merge({ "gen-vocab": { description: "Generate a vocabulary using a special serialization.", parse: false, # Only parse if there are input files, otherwise, uses vocabulary help: "gen-vocab --uri <vocabulary-URI> [--output format ttl|jsonld|html] [options] [files]\nGenerate a vocabulary from repository using a special serialization.", - lambda: ->(files, options) do + lambda: ->(files, **options) do $stdout.puts "Generate Vocabulary" raise ArgumentError, "Must specify vocabulary URI" unless options[:base_uri] # Parse input graphs, if repository is not already created if RDF::CLI.repository.empty? && !files.empty? - RDF::CLI.parse(files, options) do |reader| + RDF::CLI.parse(files, **options) do |reader| RDF::CLI.repository << reader end end # Lookup vocabulary, or generate a new vocabulary from this URI @@ -472,10 +472,10 @@ when :jsonld then out.write vocab.to_jsonld(graph: RDF::CLI.repository, prefixes: prefixes) when :html then out.write vocab.to_html(graph: RDF::CLI.repository, prefixes: prefixes, template: options[:template]) else # Use whatever writer we find writer = RDF::Writer.for(options[:output_format]) || RDF::NTriples::Writer - writer.new(out, options) do |w| + writer.new(out, **options) do |w| if RDF::CLI.repository.empty? vocab.each_statement {|s| w << s} else w << RDF::CLI.repository end