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
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/actionview-6.0.0/lib/action_view/template/text.rb
actionview-6.0.0 lib/action_view/template/text.rb
actionview-6.0.0.rc2 lib/action_view/template/text.rb
actionview-6.0.0.rc1 lib/action_view/template/text.rb
actionview-6.0.0.beta3 lib/action_view/template/text.rb
actionview-6.0.0.beta2 lib/action_view/template/text.rb