Sha256: 0865966323b1e81522906d0cc9038776016a38be175d63e0eae6fd65eb93abf3
Contents?: true
Size: 567 Bytes
Versions: 10
Compression:
Stored size: 567 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.decorate!(:pre) # compile pre phase decoration result end def strategy_class ext = File.extname(@path) case ext when '.rb' then Dsl when '.yaml','.yml' then Erb else Pass end end end end
Version data entries
10 entries across 10 versions & 1 rubygems