module CiCd::Builder::Manifest::Repo
Public Instance Methods
getRepoClass(type = nil) { || ... }
click to toggle source
# File lib/cicd/builder/manifest/mixlib/repo.rb, line 16 def getRepoClass(type = nil) @logger.step CLASS+'::'+__method__.to_s if type.nil? type ||= 'S3' if ENV.has_key?('REPO_TYPE') type = ENV['REPO_TYPE'] end end @logger.info "#{type} repo interface" clazz = begin Object.const_get("#{self.class.name.gsub(%r'::\w+$', '')}::Repo::#{type}") rescue NameError #=> e Object.const_get("CiCd::Builder::Repo::#{type}") end if block_given? if clazz.is_a?(Class) and not clazz.nil? yield end end clazz end