Sha256: 92315c1fcd8567e00663fdb88257c9b1b4e94136a1fc62f12b51d410dd1b7f37

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 Bytes

Contents

module Zuora
  module Serializers
    module Noop
      def self.serialize(model)
        attrs = model.attributes
        attr_pairs =  attrs.map { |attr| serialize_attr model, attr }
        Hash[attr_pairs]
      end

      private

      def self.serialize_attr(object, attr)
        val = object.send(attr)
        [attr, val]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zuora-ruby-0.2.0 lib/zuora/serializers/noop.rb
zuora-ruby-0.1.0 lib/zuora/serializers/noop.rb