Class: ActionView::Template::HTML
- Defined in:
- actionview/lib/action_view/template/html.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #format ⇒ Object
- #formats ⇒ Object
- #identifier ⇒ Object (also: #inspect)
-
#initialize(string, type = nil) ⇒ HTML
constructor
A new instance of HTML.
- #render(*args) ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(string, type = nil) ⇒ HTML
Returns a new instance of HTML.
9 10 11 12 13 14 15 16 17 |
# File 'actionview/lib/action_view/template/html.rb', line 9 def initialize(string, type = nil) unless type ActiveSupport::Deprecation.warn "ActionView::Template::HTML#initialize requires a type parameter" type = :html end @string = string.to_s @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type
7 8 9 |
# File 'actionview/lib/action_view/template/html.rb', line 7 def type @type end |
Instance Method Details
#format ⇒ Object
33 34 35 |
# File 'actionview/lib/action_view/template/html.rb', line 33 def format @type end |
#formats ⇒ Object
37 |
# File 'actionview/lib/action_view/template/html.rb', line 37 def formats; Array(format); end |
#identifier ⇒ Object Also known as: inspect
19 20 21 |
# File 'actionview/lib/action_view/template/html.rb', line 19 def identifier "html template" end |
#render(*args) ⇒ Object
29 30 31 |
# File 'actionview/lib/action_view/template/html.rb', line 29 def render(*args) to_str end |