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.106.0 vendor/avm/lib/avm/files/formatter/formats/xml.rb
avm-0.3.2 lib/avm/files/formatter/formats/xml.rb
avm-0.3.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.105.0 vendor/avm/lib/avm/files/formatter/formats/xml.rb
avm-0.3.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.104.0 vendor/avm/lib/avm/files/formatter/formats/xml.rb
avm-tools-0.103.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.103.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.102.2 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.102.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.102.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.101.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.100.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.99.1 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.99.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.98.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.97.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.96.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.95.0 lib/avm/files/formatter/formats/xml.rb
avm-tools-0.94.3 lib/avm/files/formatter/formats/xml.rb