diff options
Diffstat (limited to 'actionview/lib/action_view/template/text.rb')
-rw-r--r-- | actionview/lib/action_view/template/text.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 04f5b8d17a..f8d6c2811f 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -1,22 +1,21 @@ +# frozen_string_literal: true + module ActionView #:nodoc: # = Action View Text Template - class Template + class Template #:nodoc: class Text #:nodoc: attr_accessor :type - def initialize(string, type = nil) + def initialize(string) @string = string.to_s - @type = Types[type] || type if type - @type ||= Types[:text] + @type = Types[:text] end def identifier - 'text template' + "text template" end - def inspect - 'text template' - end + alias_method :inspect, :identifier def to_str @string @@ -27,7 +26,7 @@ module ActionView #:nodoc: end def formats - [@type.respond_to?(:ref) ? @type.ref : @type.to_s] + [@type.ref] end end end |