Class: CopyTunerClient::Copyray
- Inherits:
-
Object
- Object
- CopyTunerClient::Copyray
- Defined in:
- lib/copy_tuner_client/copyray.rb
Class Method Summary collapse
-
.augment_template(source, key) ⇒ Object
This: message Becomes: <!–COPYRAY views.home.index.message–>message.
Class Method Details
.augment_template(source, key) ⇒ Object
This:
Becomes:
<!--COPYRAY views.home.index.message-->message
7 8 9 10 11 12 13 |
# File 'lib/copy_tuner_client/copyray.rb', line 7 def self.augment_template(source, key) return source if source.blank? || !source.is_a?(String) escape = CopyTunerClient.configuration.html_escape && !source.html_safe? augmented = "<!--COPYRAY #{key}-->#{escape ? ERB::Util.html_escape(source) : source}" augmented.html_safe end |