class Dflat::Version::Dir
Public Class Methods
load(path)
click to toggle source
# File lib/dflat/version.rb, line 10 def self.load path d = Dir.new path return Full.new path if d.entries.any? { |f| f =~ /full/ } return Delta.new path if types.any? { |t| t[:name] =~ /redd/i } return Empty.new path end
Public Instance Methods
manifest()
click to toggle source
# File lib/dflat/version.rb, line 20 def manifest data = '' data = open(manifest_path).read if File.exists? manifest_path @manifest ||= Checkm::Manifest.new data, :path => data_path end
manifest!()
click to toggle source
# File lib/dflat/version.rb, line 26 def manifest! @manifest = nil manifest end
version()
click to toggle source
# File lib/dflat/version.rb, line 17 def version File.basename(path) end