Class: ActionView::Template::Text
- Inherits:
-
String
- Object
- String
- ActionView::Template::Text
- Defined in:
- lib/action_view/template/text.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
Instance Method Summary collapse
- #formats ⇒ Object
- #identifier ⇒ Object
-
#initialize(string, mime_type = nil) ⇒ Text
constructor
A new instance of Text.
- #inspect ⇒ Object
- #render(*args) ⇒ Object
Constructor Details
Instance Attribute Details
#mime_type ⇒ Object
Returns the value of attribute mime_type.
5 6 7 |
# File 'lib/action_view/template/text.rb', line 5 def mime_type @mime_type end |
Instance Method Details
#formats ⇒ Object
25 26 27 |
# File 'lib/action_view/template/text.rb', line 25 def formats [@mime_type.to_sym] end |
#identifier ⇒ Object
13 14 15 |
# File 'lib/action_view/template/text.rb', line 13 def identifier 'text template' end |
#inspect ⇒ Object
17 18 19 |
# File 'lib/action_view/template/text.rb', line 17 def inspect 'text template' end |
#render(*args) ⇒ Object
21 22 23 |
# File 'lib/action_view/template/text.rb', line 21 def render(*args) to_s end |