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.94.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.94.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.94.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.93.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.92.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.91.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.90.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.89.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.88.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.87.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.87.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.86.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.85.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.85.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.84.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.83.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.82.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.82.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.81.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.80.0 lib/avm/files/formatter/formats/xml.rb