class TerraspaceBundler::Mod::Fetcher
Interface of subclasses should implement
run switch_version(mod.sha) sha
Public Class Methods
new(mod)
click to toggle source
# File lib/terraspace_bundler/mod/fetcher.rb, line 8 def initialize(mod) @mod = mod end
Public Instance Methods
instance()
click to toggle source
# File lib/terraspace_bundler/mod/fetcher.rb, line 12 def instance type = @mod.type == "registry" ? "git" : @mod.type klass = "TerraspaceBundler::Mod::Fetcher::#{type.camelize}".constantize klass.new(@mod) # IE: Local.new(@mod), Git.new(@mod), S3.new(@mod), etc end