Class: ActionView::Template::HTML

Inherits:
Object
  • Object
show all
Defined in:
actionview/lib/action_view/template/html.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, type) ⇒ HTML

Returns a new instance of HTML.


9
10
11
12
# File 'actionview/lib/action_view/template/html.rb', line 9

def initialize(string, type)
  @string = string.to_s
  @type   = type
end

Instance Attribute Details

#typeObject (readonly)

:nodoc:


7
8
9
# File 'actionview/lib/action_view/template/html.rb', line 7

def type
  @type
end

Instance Method Details

#formatObject


28
29
30
# File 'actionview/lib/action_view/template/html.rb', line 28

def format
  @type
end

#identifierObject Also known as: inspect


14
15
16
# File 'actionview/lib/action_view/template/html.rb', line 14

def identifier
  "html template"
end

#render(*args) ⇒ Object


24
25
26
# File 'actionview/lib/action_view/template/html.rb', line 24

def render(*args)
  to_str
end

#to_strObject


20
21
22
# File 'actionview/lib/action_view/template/html.rb', line 20

def to_str
  ERB::Util.h(@string)
end