Class: K4compiler::Base

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

Direct Known Subclasses

Closure, Markdown, Scss

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.



10
11
12
# File 'lib/k4compiler/compiler/base.rb', line 10

def initialize(config)
  @config_ = config
end

Class Method Details

.optionsHash

Returns:

  • (Hash)


6
7
8
# File 'lib/k4compiler/compiler/base.rb', line 6

def self.options
  return {}
end

Instance Method Details

#compileObject

compile

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/k4compiler/compiler/base.rb', line 20

def compile
  raise NotImplementedError.new("Compile method implement in child classes.")
end

#configK4compiler::Config

Returns:



15
16
17
# File 'lib/k4compiler/compiler/base.rb', line 15

def config
  return @config_
end