Class: ActionView::Template::Text
- Inherits:
-
Object
- Object
- ActionView::Template::Text
show all
- Defined in:
- lib/action_view/template/text.rb
Overview
Action View Text Template
Instance Attribute Summary collapse
Instance Method Summary
collapse
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
7
8
9
|
# File 'lib/action_view/template/text.rb', line 7
def type
@type
end
|
Instance Method Details
27
28
29
|
# File 'lib/action_view/template/text.rb', line 27
def format
:text
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
|