Sha256: 73d4fc91de3e24a116214da65210c7bf2ed6da3ff91feb47fa2ba1cf173f4605

Contents?: true

Size: 659 Bytes

Versions: 96

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

require 'avm/files/formatter/formats/generic_plain'

module Avm
  module Files
    class Formatter
      module Formats
        class Xml < ::Avm::Files::Formatter::Formats::GenericPlain
          VALID_BASENAMES = %w[*.xml].freeze
          VALID_TYPES = ['xml'].freeze

          def internal_apply(files)
            format_command(files).system!
            super(files)
          end

          def format_command(files)
            ::Avm::Executables.tidy.command.append(
              %w[-xml -modify --indent auto --indent-spaces 2 --wrap 100] + files
            )
          end
        end
      end
    end
  end
end

Version data entries

96 entries across 96 versions & 2 rubygems

Version Path
avm-tools-0.67.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.66.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.65.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.64.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.64.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.64.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.63.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.62.4 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.62.3 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.62.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.62.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.62.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.61.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.60.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.59.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.58.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.58.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.57.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.56.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.55.0 lib/avm/files/formatter/formats/xml.rb