Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/serbea/helpers.rb
Overview
The simplest HTML safety “polyfill” around
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#html_safe ⇒ Object
4 5 6 |
# File 'lib/serbea/helpers.rb', line 4 def html_safe self.class.new(self).tap { _1.instance_variable_set(:@html_safe, true) } end |
#html_safe? ⇒ Boolean
8 9 10 |
# File 'lib/serbea/helpers.rb', line 8 def html_safe? instance_variable_get(:@html_safe) == true end |