Class: Lotus::Utils::Escape::SafeString Private
- Inherits:
-
String
- Object
- String
- Lotus::Utils::Escape::SafeString
- Defined in:
- lib/lotus/utils/escape.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The output of an escape.
It’s marked with this special class for two reasons:
* Don't double escape the same string (this is for `Lotus::Helpers` compatibility)
* Leave open the possibility to developers to mark a string as safe with an higher API (eg. `#raw` in `Lotus::View` or `Lotus::Helpers`)
Instance Method Summary collapse
-
#encode(*args) ⇒ SafeString
private
Encode the string the given encoding.
-
#to_s ⇒ SafeString
private
The duped string.
Instance Method Details
#encode(*args) ⇒ SafeString
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Encode the string the given encoding
395 396 397 |
# File 'lib/lotus/utils/escape.rb', line 395 def encode(*args) self.class.new super end |
#to_s ⇒ SafeString
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the duped string.
383 384 385 |
# File 'lib/lotus/utils/escape.rb', line 383 def to_s dup end |