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.2.11.3 lib/action_view/template/html.rb
actionview-4.2.11.2 lib/action_view/template/html.rb
actionview-5.0.7.2 lib/action_view/template/html.rb
actionview-4.2.11.1 lib/action_view/template/html.rb
actionview-5.0.7.1 lib/action_view/template/html.rb
actionview-4.2.11 lib/action_view/template/html.rb
actionview-5.0.7 lib/action_view/template/html.rb
actionview-4.2.10 lib/action_view/template/html.rb
actionview-4.2.10.rc1 lib/action_view/template/html.rb
actionview-5.0.6 lib/action_view/template/html.rb
actionview-5.0.6.rc1 lib/action_view/template/html.rb
actionview-5.0.5 lib/action_view/template/html.rb
actionview-5.0.5.rc2 lib/action_view/template/html.rb
actionview-5.0.5.rc1 lib/action_view/template/html.rb
actionview-4.2.9 lib/action_view/template/html.rb
actionview-4.2.9.rc2 lib/action_view/template/html.rb
actionview-5.0.4 lib/action_view/template/html.rb
actionview-5.0.4.rc1 lib/action_view/template/html.rb
actionview-4.2.9.rc1 lib/action_view/template/html.rb
actionview-5.0.3 lib/action_view/template/html.rb