lib/iq_rdf/predicate.rb in iq_rdf-0.0.14 vs lib/iq_rdf/predicate.rb in iq_rdf-0.0.15
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright 2011 Till Schulte-Coerne (innoQ Deutschland GmbH)
+# Copyright 2011 innoQ Deutschland GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@@ -29,10 +29,12 @@
block = args.pop if args.last.is_a?(Proc)
params = namespace.token == :default ? [self.uri_postfix.to_s] : [namespace.token.to_s, self.uri_postfix.to_sym]
params += args
params << {"xml:lang" => xml_lang} if xml_lang
if block
- xml.tag!(*params, &block)
+ xml.tag!(*params) do
+ block.call
+ end
else
xml.tag!(*params)
end
end
end