@@ -113,7 +113,7 @@ def self.options
113
113
# URI to use as @href for output stylesheet processing instruction.
114
114
# @yield [writer]
115
115
# @yieldparam [RDF::Writer] writer
116
- def initialize ( output = $stdout, options = { } , &block )
116
+ def initialize ( output = $stdout, ** options , &block )
117
117
super
118
118
end
119
119
@@ -170,7 +170,7 @@ def write_epilogue
170
170
# @return String
171
171
# The rendered document is returned as a string
172
172
# Return Haml template for document from `haml_template[:subject]`
173
- def render_subject ( subject , predicates , options = { } , &block )
173
+ def render_subject ( subject , predicates , ** options , &block )
174
174
# extract those properties that can be rendered as attributes
175
175
attr_props = if [ :untyped , :typed ] . include? ( @attributes )
176
176
options [ :property_values ] . inject ( { } ) do |memo , ( prop , values ) |
@@ -189,7 +189,7 @@ def render_subject(subject, predicates, options = {}, &block)
189
189
end
190
190
191
191
predicates -= attr_props . keys . map { |k | expand_curie ( k ) . to_s }
192
- super ( subject , predicates , options . merge ( attr_props : attr_props ) , &block )
192
+ super ( subject , predicates , ** options . merge ( attr_props : attr_props ) , &block )
193
193
end
194
194
# See if we can serialize as attribute.
195
195
# * untyped attributes that aren't duplicated where xml:lang == @lang
@@ -228,8 +228,8 @@ def predicate_as_attribute?(prop, object)
228
228
# @yieldreturn [:ignored]
229
229
# @return String
230
230
# The rendered document is returned as a string
231
- def render_document ( subjects , options = { } , &block )
232
- super ( subjects , options . merge ( stylesheet : @options [ :stylesheet ] ) , &block )
231
+ def render_document ( subjects , ** options , &block )
232
+ super ( subjects , ** options . merge ( stylesheet : @options [ :stylesheet ] ) , &block )
233
233
end
234
234
235
235
# Render a single- or multi-valued predicate using `haml_template[:property_value]` or `haml_template[:property_values]`. Yields each object for optional rendering. The block should only render for recursive subject definitions (i.e., where the object is also a subject and is rendered underneath the first referencing subject).
@@ -256,7 +256,7 @@ def render_document(subjects, options = {}, &block)
256
256
# The block should only return a string for recursive object definitions.
257
257
# @return String
258
258
# The rendered document is returned as a string
259
- def render_property ( predicate , objects , options = { } , &block )
259
+ def render_property ( predicate , objects , ** options , &block )
260
260
log_debug { "render_property(#{ predicate } ): #{ objects . inspect } , #{ options . inspect } " }
261
261
# If there are multiple objects, and no :property_values is defined, call recursively with
262
262
# each object
@@ -280,7 +280,7 @@ def render_property(predicate, objects, options = {}, &block)
280
280
281
281
log_debug { "list: #{ list . inspect } #{ list . to_a } " }
282
282
log_depth do
283
- render_collection ( predicate , list , options ) do |object |
283
+ render_collection ( predicate , list , ** options ) do |object |
284
284
yield ( object , true ) if block_given?
285
285
end
286
286
end
@@ -290,7 +290,7 @@ def render_property(predicate, objects, options = {}, &block)
290
290
if objects . length > 1
291
291
# Render each property using property_value template
292
292
objects . map do |object |
293
- log_depth { render_property ( predicate , [ object ] , options , &block ) }
293
+ log_depth { render_property ( predicate , [ object ] , ** options , &block ) }
294
294
end . join ( " " )
295
295
else
296
296
log_fatal ( "Missing property template" , exception : RDF ::WriterError ) if template . nil?
@@ -301,7 +301,7 @@ def render_property(predicate, objects, options = {}, &block)
301
301
property : get_qname ( predicate ) ,
302
302
recurse : log_depth <= @max_depth
303
303
} . merge ( options )
304
- hamlify ( template , options , &block )
304
+ hamlify ( template , ** options , &block )
305
305
end
306
306
end
307
307
@@ -319,7 +319,7 @@ def render_property(predicate, objects, options = {}, &block)
319
319
# The block should only return a string for recursive object definitions.
320
320
# @return String
321
321
# The rendered collection is returned as a string
322
- def render_collection ( predicate , list , options = { } , &block )
322
+ def render_collection ( predicate , list , ** options , &block )
323
323
template = options [ :haml ] || haml_template [ :collection ]
324
324
325
325
options = {
@@ -328,7 +328,7 @@ def render_collection(predicate, list, options = {}, &block)
328
328
property : get_qname ( predicate ) ,
329
329
recurse : log_depth <= @max_depth ,
330
330
} . merge ( options )
331
- hamlify ( template , options ) do |object |
331
+ hamlify ( template , ** options ) do |object |
332
332
yield object
333
333
end
334
334
end
0 commit comments