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.54.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.54.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.54.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.53.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.52.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.51.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.50.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.49.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.48.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.47.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.46.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.45.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.44.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.44.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.44.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.43.0 lib/avm/files/formatter/formats/xml.rb