@@ -113,7 +113,7 @@ def self.options
113113 # URI to use as @href for output stylesheet processing instruction.
114114 # @yield [writer]
115115 # @yieldparam [RDF::Writer] writer
116- def initialize ( output = $stdout, options = { } , &block )
116+ def initialize ( output = $stdout, ** options , &block )
117117 super
118118 end
119119
@@ -170,7 +170,7 @@ def write_epilogue
170170 # @return String
171171 # The rendered document is returned as a string
172172 # 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 )
174174 # extract those properties that can be rendered as attributes
175175 attr_props = if [ :untyped , :typed ] . include? ( @attributes )
176176 options [ :property_values ] . inject ( { } ) do |memo , ( prop , values ) |
@@ -189,7 +189,7 @@ def render_subject(subject, predicates, options = {}, &block)
189189 end
190190
191191 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 )
193193 end
194194 # See if we can serialize as attribute.
195195 # * untyped attributes that aren't duplicated where xml:lang == @lang
@@ -228,8 +228,8 @@ def predicate_as_attribute?(prop, object)
228228 # @yieldreturn [:ignored]
229229 # @return String
230230 # 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 )
233233 end
234234
235235 # 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)
256256 # The block should only return a string for recursive object definitions.
257257 # @return String
258258 # The rendered document is returned as a string
259- def render_property ( predicate , objects , options = { } , &block )
259+ def render_property ( predicate , objects , ** options , &block )
260260 log_debug { "render_property(#{ predicate } ): #{ objects . inspect } , #{ options . inspect } " }
261261 # If there are multiple objects, and no :property_values is defined, call recursively with
262262 # each object
@@ -280,7 +280,7 @@ def render_property(predicate, objects, options = {}, &block)
280280
281281 log_debug { "list: #{ list . inspect } #{ list . to_a } " }
282282 log_depth do
283- render_collection ( predicate , list , options ) do |object |
283+ render_collection ( predicate , list , ** options ) do |object |
284284 yield ( object , true ) if block_given?
285285 end
286286 end
@@ -290,7 +290,7 @@ def render_property(predicate, objects, options = {}, &block)
290290 if objects . length > 1
291291 # Render each property using property_value template
292292 objects . map do |object |
293- log_depth { render_property ( predicate , [ object ] , options , &block ) }
293+ log_depth { render_property ( predicate , [ object ] , ** options , &block ) }
294294 end . join ( " " )
295295 else
296296 log_fatal ( "Missing property template" , exception : RDF ::WriterError ) if template . nil?
@@ -301,7 +301,7 @@ def render_property(predicate, objects, options = {}, &block)
301301 property : get_qname ( predicate ) ,
302302 recurse : log_depth <= @max_depth
303303 } . merge ( options )
304- hamlify ( template , options , &block )
304+ hamlify ( template , ** options , &block )
305305 end
306306 end
307307
@@ -319,7 +319,7 @@ def render_property(predicate, objects, options = {}, &block)
319319 # The block should only return a string for recursive object definitions.
320320 # @return String
321321 # The rendered collection is returned as a string
322- def render_collection ( predicate , list , options = { } , &block )
322+ def render_collection ( predicate , list , ** options , &block )
323323 template = options [ :haml ] || haml_template [ :collection ]
324324
325325 options = {
@@ -328,7 +328,7 @@ def render_collection(predicate, list, options = {}, &block)
328328 property : get_qname ( predicate ) ,
329329 recurse : log_depth <= @max_depth ,
330330 } . merge ( options )
331- hamlify ( template , options ) do |object |
331+ hamlify ( template , ** options ) do |object |
332332 yield object
333333 end
334334 end
0 commit comments