lib/rdf/json/writer.rb in rdf-json-2.2.0 vs lib/rdf/json/writer.rb in rdf-json-3.1.0
- old
+ new
@@ -62,30 +62,30 @@
# Returns the RDF/JSON representation of a blank node.
#
# @param [RDF::Node] value
# @param [Hash{Symbol => Object}] options
# @return [String]
- def format_node(value, options = {})
+ def format_node(value, **options)
value.to_rdf_json.to_json
end
##
# Returns the RDF/JSON representation of a URI reference.
#
# @param [RDF::URI] value
# @param [Hash{Symbol => Object}] options
# @return [String]
- def format_uri(value, options = {})
+ def format_uri(value, **options)
value.to_rdf_json.to_json
end
##
# Returns the RDF/JSON representation of a literal.
#
# @param [RDF::Literal, String, #to_s] value
# @param [Hash{Symbol => Object}] options
# @return [String]
- def format_literal(value, options = {})
+ def format_literal(value, **options)
case value
when RDF::Literal then value.to_rdf_json.to_json
else RDF::Literal.new(value).to_rdf_json.to_json
end
end