lib/vnstat/document.rb in vnstat-ruby-2.0.0 vs lib/vnstat/document.rb in vnstat-ruby-3.0.0
- old
+ new
@@ -37,9 +37,10 @@
#
# @param [String] data A string representing the document.
# @raise [ArgumentError] Raised if the specified data was nil.
def data=(data)
raise ArgumentError, 'No document data specified' if data.nil?
+
@data = Nokogiri::XML.parse(data.to_s)
end
##
# Returns the version as specified in the vnstat element.