aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_view/template/text.rb
blob: 9f12e5e0a8c25dcba5d6690041248acd44183d4b (plain) (tree)
1
2
3
4
5
6
7
8

                                      
 
                                                      
                        
                                                        

       



                                          
                             


                          
                                     


                                 
                            

     
module ActionView #:nodoc:
  class TextTemplate < String #:nodoc:

    def initialize(string, content_type = Mime[:html])
      super(string.to_s)
      @content_type = Mime[content_type] || content_type
    end

    def details
      {:formats => [@content_type.to_sym]}
    end

    def identifier() self end
    
    def render(*) self end
    
    def mime_type() @content_type end

    def formats() [mime_type] end

    def partial?() false end
  end
end