Class: BetterHtml::BetterErb::ValidatedOutputBuffer

Inherits:
Object
  • Object
show all
Defined in:
lib/better_html/better_erb/validated_output_buffer.rb

Defined Under Namespace

Classes: Context

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.wrap(output, context, code, auto_escape) ⇒ Object



156
157
158
# File 'lib/better_html/better_erb/validated_output_buffer.rb', line 156

def wrap(output, context, code, auto_escape)
  Context.new(output, context, code, auto_escape)
end

Instance Method Details

#html_safeObject



165
166
167
# File 'lib/better_html/better_erb/validated_output_buffer.rb', line 165

def html_safe
  self.class.new(@output)
end

#html_safe?Boolean

Returns:

  • (Boolean)


161
162
163
# File 'lib/better_html/better_erb/validated_output_buffer.rb', line 161

def html_safe?
  true
end

#to_sObject



169
170
171
# File 'lib/better_html/better_erb/validated_output_buffer.rb', line 169

def to_s
  @output.html_safe
end