Class: Prettier

Inherits:
REXML::Formatters::Default
  • Object
show all
Defined in:
lib/kinetic_sdk/utils/prettier-xml-formatter.rb

Overview

Custom REXML formatter that removes blank lines, extra whitespace, and ensures lines are indented properly.

This class is used for pre-4.4 Kinetic Task servers to format tree xml content when exporting trees and routines.

Instance Method Summary collapse

Constructor Details

#initialize(indentation = 4) ⇒ Prettier

Returns a new instance of Prettier.



10
11
12
13
# File 'lib/kinetic_sdk/utils/prettier-xml-formatter.rb', line 10

def initialize( indentation = 4 )
  @indentation = indentation
  @level = 0
end