Sha256: ecb269272d4091f2c57813cb332f11d165f241d3730833dd52f51c9069743672
Contents?: true
Size: 636 Bytes
Versions: 91
Compression:
Stored size: 636 Bytes
Contents
# frozen_string_literal: true module ActionView #:nodoc: # = Action View HTML Template class Template #:nodoc: class HTML #:nodoc: attr_accessor :type def initialize(string, type = nil) @string = string.to_s @type = Types[type] || type if type @type ||= Types[:html] end def identifier "html template" end alias_method :inspect, :identifier def to_str ERB::Util.h(@string) end def render(*args) to_str end def formats [@type.respond_to?(:ref) ? @type.ref : @type.to_s] end end end end
Version data entries
91 entries across 91 versions & 5 rubygems