Skip to content

Commit

Permalink
Autocorrect offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Jun 7, 2018
1 parent 13d791e commit 4b6933e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/happymapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def parse_node(node, options, namespace, namespaces)
# If an existing HappyMapper object is provided, update it with the
# values from the xml being parsed. Otherwise, create a new object

obj = options[:update] ? options[:update] : new
obj = options[:update] || new

attributes.each do |attr|
value = attr.from_xml_node(node, namespace, namespaces)
Expand Down
2 changes: 1 addition & 1 deletion lib/happymapper/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def find(node, namespace, xpath_options)
value
end
else
target_path = options[:xpath] ? options[:xpath] : xpath(namespace)
target_path = options[:xpath] || xpath(namespace)
node.xpath(target_path, xpath_options).collect do |item|
value = yield(item)
handle_attributes_option(item, value, xpath_options)
Expand Down

0 comments on commit 4b6933e

Please sign in to comment.