Class: Genit::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/genit/project/compiler.rb

Overview

Web site “compiler”.

Instance Method Summary collapse

Constructor Details

#initialize(working_dir) ⇒ Compiler

Public: Constructor.

working_dir - The String working directory, where live the project.



11
12
13
14
15
# File 'lib/genit/project/compiler.rb', line 11

def initialize working_dir
  @working_dir = working_dir
  check_missing_file '.genit', 'Not a genit project folder'
  check_missing_file 'config', 'Missing config file'
end

Instance Method Details

#compileObject

Public: Compile the web site.



18
19
20
21
22
# File 'lib/genit/project/compiler.rb', line 18

def compile
  RootCleaner.new(@working_dir).clean
  compile_site
  Css.new(@working_dir).render
end