Sha256: 6460877bcb77768c3b9dc9792f85fd33583d6d7147edc517e1d64488996397b0

Contents?: true

Size: 552 Bytes

Versions: 46

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

module ActionView #:nodoc:
  # = Action View Text Template
  class Template #:nodoc:
    class Text #:nodoc:
      attr_accessor :type

      def initialize(string)
        @string = string.to_s
      end

      def identifier
        "text template"
      end

      alias_method :inspect, :identifier

      def to_str
        @string
      end

      def render(*args)
        to_str
      end

      def format
        :text
      end

      def formats; Array(format); end
      deprecate :formats
    end
  end
end

Version data entries

46 entries across 44 versions & 5 rubygems

Version Path
actionview-6.0.6.1 lib/action_view/template/text.rb
actionview-6.0.6 lib/action_view/template/text.rb
actionview-6.0.5.1 lib/action_view/template/text.rb
actionview-6.0.5 lib/action_view/template/text.rb
actionview-6.0.4.8 lib/action_view/template/text.rb
actionview-6.0.4.7 lib/action_view/template/text.rb
actionview-6.0.4.6 lib/action_view/template/text.rb
actionview-6.0.4.5 lib/action_view/template/text.rb
actionview-6.0.4.4 lib/action_view/template/text.rb
actionview-6.0.4.3 lib/action_view/template/text.rb
actionview-6.0.4.2 lib/action_view/template/text.rb
actionview-6.0.4.1 lib/action_view/template/text.rb
actionview-6.0.4 lib/action_view/template/text.rb
actionview-6.0.3.7 lib/action_view/template/text.rb
actionview-6.0.3.6 lib/action_view/template/text.rb
actionview-6.0.3.5 lib/action_view/template/text.rb
actionview-6.0.3.4 lib/action_view/template/text.rb
actionview-6.0.3.3 lib/action_view/template/text.rb
actionview-6.0.3.2 lib/action_view/template/text.rb
actionview-6.0.3.1 lib/action_view/template/text.rb