Sha256: 9c43a5d78b1859281e551210db9307e7629c1a7a5a99e92edd589cd4f7c1f7c7
Contents?: true
Size: 539 Bytes
Versions: 12
Compression:
Stored size: 539 Bytes
Contents
module Terraspace::Compiler::Strategy class Mod < AbstractBase def run klass = strategy_class(@src_path) strategy = klass.new(@mod, @src_path) # IE: Terraspace::Compiler::Strategy::Mod::Rb.new strategy.run end def strategy_class(path) ext = File.extname(path).sub('.','') return Mod::Pass if ext.empty? # infinite loop without this return Mod::Pass if Terraspace.pass_file?(path) "Terraspace::Compiler::Strategy::Mod::#{ext.camelize}".constantize rescue Mod::Pass end end end
Version data entries
12 entries across 12 versions & 1 rubygems