Class: ActionView::Template::Text
- Inherits:
-
Object
- Object
- ActionView::Template::Text
- Defined in:
- lib/action_view/template/text.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#type ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #format ⇒ Object
- #formats ⇒ Object
- #identifier ⇒ Object (also: #inspect)
-
#initialize(string) ⇒ Text
constructor
A new instance of Text.
- #render(*args) ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(string) ⇒ Text
Returns a new instance of Text.
9 10 11 |
# File 'lib/action_view/template/text.rb', line 9 def initialize(string) @string = string.to_s end |
Instance Attribute Details
#type ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/action_view/template/text.rb', line 7 def type @type end |
Instance Method Details
#format ⇒ Object
27 28 29 |
# File 'lib/action_view/template/text.rb', line 27 def format :text end |
#formats ⇒ Object
31 |
# File 'lib/action_view/template/text.rb', line 31 def formats; Array(format); end |
#identifier ⇒ Object Also known as: inspect
13 14 15 |
# File 'lib/action_view/template/text.rb', line 13 def identifier "text template" end |
#render(*args) ⇒ Object
23 24 25 |
# File 'lib/action_view/template/text.rb', line 23 def render(*args) to_str end |
#to_str ⇒ Object
19 20 21 |
# File 'lib/action_view/template/text.rb', line 19 def to_str @string end |