Class: EmberCli::HtmlPage

Inherits:
Object
  • Object
show all
Defined in:
lib/ember_cli/html_page.rb

Instance Method Summary collapse

Constructor Details

#initialize(content:, head: "", body: "") ⇒ HtmlPage

Returns a new instance of HtmlPage.



3
4
5
6
7
# File 'lib/ember_cli/html_page.rb', line 3

def initialize(content:, head: "", body: "")
  @content = content
  @head = head
  @body = body
end

Instance Method Details

#renderObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ember_cli/html_page.rb', line 9

def render
  if has_head_tag?
    insert_head_content
  end

  if has_body_tag?
    insert_body_content
  end

  content
end