Class: HtmlBeautifier::Builder
- Inherits:
-
Object
- Object
- HtmlBeautifier::Builder
- Defined in:
- lib/htmlbeautifier/builder.rb
Constant Summary collapse
- RUBY_INDENT =
%r{ ^ ( if | unless | while | begin | elsif | else )\b | \b ( do | \{ ) ( \s* \| [^\|]+ \| )? $ }x
- RUBY_OUTDENT =
%r{ ^ ( end | elsif | else |\} ) \b }x
- ELEMENT_CONTENT =
%r{ (?:[^<>]|<%.*?%>)* }mx
- DEFAULT_OPTIONS =
{ tab_stops: 2, stop_on_errors: false }
Instance Method Summary collapse
-
#initialize(output, options = {}) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(output, options = {}) ⇒ Builder
Returns a new instance of Builder.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/htmlbeautifier/builder.rb', line 20 def initialize(output, = {}) = DEFAULT_OPTIONS.merge() @level = 0 @new_line = false @tab = ' ' * [:tab_stops] @stop_on_errors = [:stop_on_errors] @output = output @empty = true @ie_cc_levels = [] end |