Class: Zold::VersionFile

Inherits:
Object
  • Object
show all
Defined in:
lib/zold/version_file.rb

Overview

Read and write .zoldata/version.

Instance Method Summary collapse

Constructor Details

#initialize(path, log: Log::VERBOSE) ⇒ VersionFile

Returns a new instance of VersionFile.



29
30
31
32
# File 'lib/zold/version_file.rb', line 29

def initialize(path, log: Log::VERBOSE)
  @path = path
  @log = log
end

Instance Method Details

#apply(version) ⇒ Object

TODO:

#285:30min Replace this stub with functionality. We need to run the script (‘yield`) if the version of the script is between the saved version and the current one.



37
38
39
# File 'lib/zold/version_file.rb', line 37

def apply(version)
  @log.info("Version #{version} doesn't need to be applied.")
end