lib/xmlenc/builder/base.rb in xmlenc-0.5.0 vs lib/xmlenc/builder/base.rb in xmlenc-0.6.0

- old
+ new

@@ -1,21 +1,21 @@ -require "happymapper" +require "xmlmapper" module Xmlenc module Builder module Base extend ActiveSupport::Concern included do - include ::HappyMapper + include ::XmlMapper include ::ActiveModel::Validations - extend HappyMapperClassMethods - include HappyMapperInstanceMethods + extend XmlMapperClassMethods + include XmlMapperInstanceMethods end - module HappyMapperInstanceMethods + module XmlMapperInstanceMethods def initialize(attributes = {}) attributes.each do |key, value| send("#{key}=", value) if respond_to?("#{key}=") && value.present? end end @@ -27,10 +27,10 @@ def from_xml? @from_xml end end - module HappyMapperClassMethods + module XmlMapperClassMethods def parse(xml, options = {}) raise Xmlenc::UnparseableMessage("Unable to parse nil document") if xml.nil? object = super if object.is_a?(Array)