Pass keyword argument to XML::Querying#xpath implicitly
This commit is contained in:
parent
ac3fe8f343
commit
804f755101
|
@ -63,8 +63,8 @@ module Oga
|
|||
#
|
||||
# @see [#xpath]
|
||||
# @return [Oga::XML::Node|Oga::XML::Attribute]
|
||||
def at_xpath(*args)
|
||||
result = xpath(*args)
|
||||
def at_xpath(*args, namespaces: nil)
|
||||
result = xpath(*args, namespaces: namespaces)
|
||||
|
||||
result.is_a?(XML::NodeSet) ? result.first : result
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue