Sha256: 18c97272cbe23128464463e8c93dc8b4852bbcad6c5938f0a3c757c67eb75758
Contents?: true
Size: 601 Bytes
Versions: 11
Compression:
Stored size: 601 Bytes
Contents
module ActionView #:nodoc: # = Action View Text Template class Template class Text < String #:nodoc: attr_accessor :mime_type def initialize(string, mime_type = nil) super(string.to_s) @mime_type = Mime[mime_type] || mime_type if mime_type @mime_type ||= Mime::TEXT end def identifier 'text template' end def inspect 'text template' end def render(*args) to_s end def formats [@mime_type.respond_to?(:ref) ? @mime_type.ref : @mime_type.to_s] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems