Sha256: 89d9bbf74a414aeb7b2252c23b9afdc68bbadb612d50e7c3fcf37b3e4a04e624
Contents?: true
Size: 558 Bytes
Versions: 13
Compression:
Stored size: 558 Bytes
Contents
class Kubes::Compiler class Strategy def initialize(options={}) @options = options @path = options[:path] end def compile klass = strategy_class return false unless klass strategy = klass.new(@options.merge(path: @path)) # Dsl or Erb result = strategy.run result.compile_decorate! # compile phase decoration result end def strategy_class ext = File.extname(@path) case ext when '.rb' then Dsl when '.yaml' then Erb else Pass end end end end
Version data entries
13 entries across 13 versions & 1 rubygems