@@ -32,28 +32,28 @@ def run(input, options)
3232 prefixes = { }
3333 start = Time . new
3434 if options [ :flatten ]
35- output = JSON ::LD ::API . flatten ( input , options . delete ( :context ) , options )
35+ output = JSON ::LD ::API . flatten ( input , options . delete ( :context ) , ** options )
3636 secs = Time . new - start
3737 options [ :output ] . puts output . to_json ( JSON ::LD ::JSON_STATE )
3838 puts "Flattened in #{ secs } seconds."
3939 elsif options [ :expand ]
4040 options = options . merge ( expandContext : options . delete ( :context ) ) if options . has_key? ( :context )
41- output = JSON ::LD ::API . expand ( input , options )
41+ output = JSON ::LD ::API . expand ( input , ** options )
4242 secs = Time . new - start
4343 options [ :output ] . puts output . to_json ( JSON ::LD ::JSON_STATE )
4444 puts "Expanded in #{ secs } seconds."
4545 elsif options [ :compact ]
46- output = JSON ::LD ::API . compact ( input , options [ :context ] , options )
46+ output = JSON ::LD ::API . compact ( input , options [ :context ] , ** options )
4747 secs = Time . new - start
4848 options [ :output ] . puts output . to_json ( JSON ::LD ::JSON_STATE )
4949 puts "Compacted in #{ secs } seconds."
5050 elsif options [ :frame ]
51- output = JSON ::LD ::API . frame ( input , options [ :frame ] , options )
51+ output = JSON ::LD ::API . frame ( input , options [ :frame ] , ** options )
5252 secs = Time . new - start
5353 options [ :output ] . puts output . to_json ( JSON ::LD ::JSON_STATE )
5454 puts "Framed in #{ secs } seconds."
5555 else
56- r = reader_class . new ( input , options [ :parser_options ] )
56+ r = reader_class . new ( input , ** options [ :parser_options ] )
5757 if options [ :output_format ] == :none
5858 num = 0
5959 r . each_statement { num += 1 } # Eat statements
@@ -63,7 +63,7 @@ def run(input, options)
6363 secs = Time . new - start
6464 num = g . count
6565 parser_options = options [ :parser_options ] . merge ( prefixes : r . prefixes , standard_prefixes : true )
66- options [ :output ] . puts g . dump ( options [ :output_format ] , parser_options )
66+ options [ :output ] . puts g . dump ( options [ :output_format ] , ** parser_options )
6767 puts
6868 end
6969 puts "Parsed #{ num } statements in #{ secs } seconds @ #{ num /secs } statements/second."
0 commit comments