openxml/openxml-package

View on GitHub
lib/openxml/contains_properties.rb

Summary

Maintainability
A
0 mins
Test Coverage
require "openxml/has_properties"

module OpenXml
  module ContainsProperties

    def self.included(base)
      base.class_eval do
        include HasProperties
        include InstanceMethods
      end
    end

    module InstanceMethods

      def property_xml(xml)
        ensure_required_choices
        props = active_properties
        return unless render_properties? props
        props.each { |prop| prop.to_xml(xml) }
      end

      def properties_attributes
        {}
      end

    end

  end
end