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
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/actionview-4.2.8/lib/action_view/template/html.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/actionview-5.0.2/lib/action_view/template/html.rb
actionview-5.0.2 lib/action_view/template/html.rb
actionview-5.0.2.rc1 lib/action_view/template/html.rb
actionview-4.2.8 lib/action_view/template/html.rb
actionview-4.2.8.rc1 lib/action_view/template/html.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-5.0.1/lib/action_view/template/html.rb
abaci-0.3.0 vendor/bundle/gems/actionview-5.0.0/lib/action_view/template/html.rb
actionview-5.0.1 lib/action_view/template/html.rb
actionview-5.0.1.rc2 lib/action_view/template/html.rb
actionview-5.0.1.rc1 lib/action_view/template/html.rb
actionview-5.0.0.1 lib/action_view/template/html.rb
actionview-4.2.7.1 lib/action_view/template/html.rb
actionview-4.2.7 lib/action_view/template/html.rb