Sha256: 87469fd0ceb2ce09fa854c76de8b085b11dcbb3cc777965e004917598e8b272a

Contents?: true

Size: 607 Bytes

Versions: 129

Compression:

Stored size: 607 Bytes

Contents

module ActionView #:nodoc:
  # = Action View HTML Template
  class Template
    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

      def inspect
        'html template'
      end

      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

129 entries across 124 versions & 11 rubygems

Version Path
actionview-4.1.3 lib/action_view/template/html.rb
actionview-4.1.2 lib/action_view/template/html.rb
actionview-4.1.2.rc3 lib/action_view/template/html.rb
actionview-4.1.2.rc2 lib/action_view/template/html.rb
actionview-4.1.2.rc1 lib/action_view/template/html.rb
actionview-4.1.1 lib/action_view/template/html.rb
actionview-4.1.0 lib/action_view/template/html.rb
actionview-4.1.0.rc2 lib/action_view/template/html.rb
actionview-4.1.0.rc1 lib/action_view/template/html.rb