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.16 lib/action_view/template/html.rb
actionview-4.1.16.rc1 lib/action_view/template/html.rb
actionview-4.2.7.rc1 lib/action_view/template/html.rb
actionview-5.0.0 lib/action_view/template/html.rb
actionview-5.0.0.rc2 lib/action_view/template/html.rb
actionview-5.0.0.racecar1 lib/action_view/template/html.rb
actionview-5.0.0.rc1 lib/action_view/template/html.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.6/lib/action_view/template/html.rb
actionview-5.0.0.beta4 lib/action_view/template/html.rb
actionview-4.1.15 lib/action_view/template/html.rb
actionview-4.2.6 lib/action_view/template/html.rb
actionview-4.1.15.rc1 lib/action_view/template/html.rb
actionview-4.2.6.rc1 lib/action_view/template/html.rb
actionview-4.1.14.2 lib/action_view/template/html.rb
actionview-4.2.5.2 lib/action_view/template/html.rb
actionview-5.0.0.beta3 lib/action_view/template/html.rb
actionview-5.0.0.beta2 lib/action_view/template/html.rb
activejob-lock-0.0.2 rails/actionview/lib/action_view/template/html.rb
actionview-5.0.0.beta1.1 lib/action_view/template/html.rb
actionview-4.2.5.1 lib/action_view/template/html.rb