class Imagen::RemoteBuilder
RemoteBuilder
is responsible for wrapping all operations to create code structure for a remote git repository.
Attributes
dir[R]
repo_url[R]
Public Class Methods
new(repo_url)
click to toggle source
# File lib/imagen/remote_builder.rb, line 12 def initialize(repo_url) @repo_url = repo_url @dir = Dir.mktmpdir end
Public Instance Methods
build()
click to toggle source
# File lib/imagen/remote_builder.rb, line 17 def build Clone.perform(repo_url, dir) Imagen::Node::Root.new.build_from_dir(dir).tap { teardown } end
Private Instance Methods
teardown()
click to toggle source
# File lib/imagen/remote_builder.rb, line 24 def teardown FileUtils.remove_entry dir end