Class: K4compiler::Compiler

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

Instance Method Summary collapse

Constructor Details

#initializeCompiler

Returns a new instance of Compiler.



4
5
# File 'lib/k4compiler/compiler.rb', line 4

def initialize
end

Instance Method Details

#closureK4compiler::Closure

Returns:



24
25
26
27
# File 'lib/k4compiler/compiler.rb', line 24

def closure
  instance = ::K4compiler::Closure.new(config)
  return instance
end

#configK4Compiler::Config

Returns:

  • (K4Compiler::Config)


15
16
17
18
19
20
21
# File 'lib/k4compiler/compiler.rb', line 15

def config
  @config_ ||= lambda {
    instance = ::K4compiler::Config.new
    instance
  }.call
  return @config_
end

#markdownK4compiler::Closure

Returns:



36
37
38
39
# File 'lib/k4compiler/compiler.rb', line 36

def markdown
  instance = ::K4compiler::Markdown.new(config)
  return instance
end

#scssK4compiler::Scss

Returns:



30
31
32
33
# File 'lib/k4compiler/compiler.rb', line 30

def scss
  instance = ::K4compiler::Scss.new(config)
  return instance
end

#setup {|config| ... } ⇒ K4compiler::Compiler

Yields:

Returns:



8
9
10
11
# File 'lib/k4compiler/compiler.rb', line 8

def setup(&block)
  yield(config) if block_given?
  return self
end