Commit b06ec530 by liyijie

Add try_chain & try_method to export handle_data

parent 86c7dca0
...@@ -150,9 +150,7 @@ module TalltyImportExport ...@@ -150,9 +150,7 @@ module TalltyImportExport
elsif header[:method].present? elsif header[:method].present?
send(header[:method], record, header) send(header[:method], record, header)
elsif header[:chain].present? elsif header[:chain].present?
header[:chain].reduce(record) do |obj, method| try_chain(record, header[:chain])
obj.send(method)
end
elsif header[:json] elsif header[:json]
record.send(header[:json])[header[:key]] record.send(header[:json])[header[:key]]
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment