Sha256: 8c1d58adf96f55a9672d3beb54dd24aae22d1d065aeb1db1d8862eb249e43203
Contents?: true
Size: 484 Bytes
Versions: 17
Compression:
Stored size: 484 Bytes
Contents
require 'htmlbeautifier' module Eac class Htmlbeautifier def self.beautify(string) ::HtmlBeautifier.beautify(string, tab_stops: 2) + "\n" end def self.file_beautified?(file) input = File.read(file) input == beautify(input) end def self.beautify_file(file) input = File.read(file) output = beautify(input) if input == output false else File.write(file, output) true end end end end
Version data entries
17 entries across 17 versions & 1 rubygems