class Imagemaster3000::Entities::Definitions
Public Class Methods
new(repository)
click to toggle source
# File lib/imagemaster3000/entities/definitions.rb, line 4 def initialize(repository) @repository = repository self.branch = Imagemaster3000::Settings['definitions-branch'] if Imagemaster3000::Settings['definitions-branch'] end
Public Instance Methods
branch=(branch)
click to toggle source
# File lib/imagemaster3000/entities/definitions.rb, line 14 def branch=(branch) raise Imagemaster3000::Errors::ArgumentError, "no such branch #{branch.inspect}" unless @repository.is_branch? branch logger.debug "Changing branch to #{branch}" @repository.checkout branch end
clean()
click to toggle source
# File lib/imagemaster3000/entities/definitions.rb, line 21 def clean logger.debug "Cleaning definitions #{@directory}" FileUtils.remove_entry path end
path()
click to toggle source
# File lib/imagemaster3000/entities/definitions.rb, line 10 def path @repository.dir.path end