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

Version Path
actionview-5.2.8.1 lib/action_view/template/html.rb
actionview-5.2.8 lib/action_view/template/html.rb
actionview-5.2.7.1 lib/action_view/template/html.rb
actionview-5.2.7 lib/action_view/template/html.rb
actionview-5.2.6.3 lib/action_view/template/html.rb
actionview-5.2.6.2 lib/action_view/template/html.rb
actionview-5.2.6.1 lib/action_view/template/html.rb
actionview-5.2.6 lib/action_view/template/html.rb
actionview-5.2.4.6 lib/action_view/template/html.rb
actionview-5.2.5 lib/action_view/template/html.rb
actionview-5.2.4.5 lib/action_view/template/html.rb
actionview-5.2.4.4 lib/action_view/template/html.rb
actionview-5.2.4.3 lib/action_view/template/html.rb
actionview-5.2.4.2 lib/action_view/template/html.rb
actionview-5.2.4.1 lib/action_view/template/html.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/actionview-5.2.3/lib/action_view/template/html.rb
actionview-5.2.4 lib/action_view/template/html.rb
actionview-5.2.4.rc1 lib/action_view/template/html.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/actionview-5.2.3/lib/action_view/template/html.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/actionview-5.2.3/lib/action_view/template/html.rb