class Pod::Installer::ProjectCache::ProjectCacheVersion
Object that stores, loads, and holds the version of the project cache.
Attributes
version[R]
@return [Version] The version of the project cache.
Public Class Methods
from_file(path)
click to toggle source
Constructs a ProjectCacheVersion
from a file.
@param [String] path
The path of the project cache
@return [ProjectCacheVersion]
# File lib/cocoapods/installer/project_cache/project_cache_version.rb, line 26 def self.from_file(path) return ProjectCacheVersion.new unless File.exist?(path) cached_version = Version.create(File.read(path)) ProjectCacheVersion.new(cached_version) end
new(version = Version.create('0'))
click to toggle source
Initialize a new instance.
@param [Version] version @see version
# File lib/cocoapods/installer/project_cache/project_cache_version.rb, line 15 def initialize(version = Version.create('0')) @version = version end
Public Instance Methods
save_as(path)
click to toggle source
@return [void]
@param [String] path
The path of the project cache to save.
# File lib/cocoapods/installer/project_cache/project_cache_version.rb, line 37 def save_as(path) Sandbox.update_changed_file(path, version.to_s) end