handlers/mantis_project_delete_category_v1/handler/vendor/gyoku-0.3.1/lib/gyoku/xml_value.rb
def to_xml_value(object, escape_xml = true)
      if DateTime === object
        object.strftime XS_DATETIME_FORMAT
      elsif String === object
        escape_xml ? CGI.escapeHTML(object) : object
      elsif object.respond_to?(:to_datetime)
        to_xml_value object.to_datetime
      elsif object.respond_to?(:call)
        to_xml_value object.call
      else
        object.to_s
      end
    end
# Converts a given +object+ to an XML value.
Converts a given +object+ to an XML value.
Converts a given + object + to an XML value .
def to_xml_value(object, escape_xml = true)
      if DateTime === object
        object.strftime XS_DATETIME_FORMAT
      elsif String === object
        escape_xml ? CGI.escapeHTML(object) : object
      elsif object.respond_to?(:to_datetime)
        to_xml_value object.to_datetime
      elsif object.respond_to?(:call)
        to_xml_value object.call
      else
        object.to_s
      end
    end
def to_xml_value ( object , escape_xml = true ) if DateTime === object object . strftime XS_DATETIME_FORMAT elsif String === object escape_xml ? CGI . escapeHTML ( object ) : object elsif object . respond_to? ( :to_datetime ) to_xml_value object . to_datetime elsif object . respond_to? ( :call ) to_xml_value object . call else object . to_s end end
Converts a given +object+ to an XML value.
Converts a given + object + to an XML value .
object
escape_xml