Method: Docman::Application#template

Defined in:
lib/application.rb

#template(name, options = false) ⇒ Object



101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/application.rb', line 101

def template(name, options = false)
  with_rescue(false) do
    @options = options
    @docroot_config = DocrootConfig.new(@workspace_dir, nil)
    project = @docroot_config.project(name)
    unless project['template'].nil?
      Dir.chdir project['full_build_path']
      Exec.do "#{Application::bin}/project-template.sh #{project['template']}"
      log "Project had been initialized with template: #{project['template']}"
    end
  end
end