Class: Kubes::Compiler::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/kubes/compiler/strategy.rb,
lib/kubes/compiler/strategy/erb.rb,
lib/kubes/compiler/strategy/base.rb,
lib/kubes/compiler/strategy/pass.rb,
lib/kubes/compiler/strategy/result.rb,
lib/kubes/compiler/strategy/dispatcher.rb

Defined Under Namespace

Classes: Base, Dispatcher, Erb, Pass, Result

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Strategy

Returns a new instance of Strategy.



3
4
5
6
# File 'lib/kubes/compiler/strategy.rb', line 3

def initialize(options={})
  @options = options
  @path = options[:path]
end

Instance Method Details

#compileObject



8
9
10
11
12
# File 'lib/kubes/compiler/strategy.rb', line 8

def compile
  result = Dispatcher.new(@options.merge(path: @path)).dispatch
  result.decorate!(:pre) # compile pre phase decoration
  result
end