Sha256: 22844eb20e5d02d3360f1c36138b0dfe7826d72a697199160b5498ca41034f28
Contents?: true
Size: 674 Bytes
Versions: 30
Compression:
Stored size: 674 Bytes
Contents
require 'fileutils' require 'yaml' module Babelyoda class GitVersions def initialize @versions = load || {} end def exist?(filename) @versions.has_key?(filename) end def filename '.babelyoda/git_versions.yml' end def save! FileUtils.mkdir_p(File.dirname(filename)) File.open(filename, 'w') {|f| f.write(@versions.to_yaml) } end def [](filename) @versions[filename] end def []=(filename, value) @versions[filename] = value end private def load @versions = YAML::load_file(filename) if File.exist?(filename) end end end
Version data entries
30 entries across 30 versions & 1 rubygems