Class: Hanamismith::Builders::Layout

Inherits:
Rubysmith::Builders::Abstract
  • Object
show all
Defined in:
lib/hanamismith/builders/layout.rb

Overview

Builds app layout.

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/hanamismith/builders/layout.rb', line 11

def call
  path = "%project_name%/app/templates/layouts/app.html.erb.erb"
  builder.call(settings.merge(template_path: path))
         .render
         .replace("<!-- title -->", "<%= content_for :title %>")
         .replace("<!-- icon -->", icon)
         .replace("<!-- manifest -->", manifest)
         .replace("<!-- stylesheet -->", stylesheet)
         .replace("<!-- yield -->", "<%= yield %>")

  true
end