Sha256: 34d635cb2d060bed9d71a33865828b7a05edda73b11c2dd20619da126b0d72e2

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

#encoding: utf-8

#Main
module CommandExec
  #Formatting output
  module Formatter
    #Style as xml string
    class XML < CommandExec::Formatter::Hash

      # convert the prepared output to a xml string
      #
      # @param [Array,Symbol) fields
      #   the fields which should be outputted
      #
      # @return [String] 
      #   the output formatted as a xml string
      def output(*fields)
        XmlSimple.xml_out(prepare_output(fields.flatten), 'RootName' => 'command', 'NoAttr' => true)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
command_exec-0.2.0 lib/command_exec/formatter/xml.rb