Sha256: 7e2527c10bc7757416a11aaae8c9eba052661fd7c355ad9f7c5858ad3392152c

Contents?: true

Size: 458 Bytes

Versions: 10

Compression:

Stored size: 458 Bytes

Contents

module CopyTunerClient
  class Copyray
    # This:
    #   message
    # Becomes:
    #   <!--COPYRAY views.home.index.message-->message
    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
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
copy_tuner_client-0.19.0 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.18.0 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.17.1 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.16.3 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.16.2 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.16.1 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.16.0 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.15.1 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.15.0 lib/copy_tuner_client/copyray.rb
copy_tuner_client-0.14.2 lib/copy_tuner_client/copyray.rb