Class: Amrita2::Util::SanitizedString
- Defined in:
- lib/amrita2/template.rb
Overview
Amrita2 sanitize anything except for SanitizedString If you want to sanitize yourself and don’t want to Amrita2 sanitize your object, pass SanitizedString as model data.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.[](s) ⇒ Object
165 166 167 |
# File 'lib/amrita2/template.rb', line 165 def SanitizedString::[](s) new(s.to_s).freeze end |
Instance Method Details
#*(n) ⇒ Object
177 178 179 |
# File 'lib/amrita2/template.rb', line 177 def *(n) SanitizedString[super] end |
#amrita_value ⇒ Object
169 170 171 |
# File 'lib/amrita2/template.rb', line 169 def amrita_value self end |
#inspect ⇒ Object
181 182 183 |
# File 'lib/amrita2/template.rb', line 181 def inspect %[SanitizedString[#{super}]] end |
#to_s ⇒ Object
173 174 175 |
# File 'lib/amrita2/template.rb', line 173 def to_s self end |