class SteamCodec::ACF::MountedDepots

Public Class Methods

new(mountedDepots = {}) click to toggle source
# File lib/steam_codec/acf.rb, line 160
def initialize(mountedDepots = {})
    load(mountedDepots)
end

Public Instance Methods

depots() click to toggle source
# File lib/steam_codec/acf.rb, line 176
def depots
    @MountedDepots.keys
end
get(path = '', seperator = '.') click to toggle source
# File lib/steam_codec/acf.rb, line 172
def get(path = '', seperator = '.')
    @MountedDepots[path.to_i]
end
getDepot(manifestID) click to toggle source
# File lib/steam_codec/acf.rb, line 191
def getDepot(manifestID)
    @MountedDepots.each do |depot, manifest|
        return depot if manifest == manifestID
    end
    nil
end
getManifest(depotID) click to toggle source
# File lib/steam_codec/acf.rb, line 184
def getManifest(depotID)
    @MountedDepots.each do |depot, manifest|
        return manifest if depot == depotID
    end
    nil
end
load(mountedDepots) click to toggle source
# File lib/steam_codec/acf.rb, line 164
def load(mountedDepots)
    raise ArgumentError, "MountedDepots must be instance of Hash" unless mountedDepots.is_a?(Hash)
    @MountedDepots = {}
    mountedDepots.each do |depot, manifest|
        @MountedDepots[depot.to_i] = manifest
    end
end
manifests() click to toggle source
# File lib/steam_codec/acf.rb, line 180
def manifests
    @MountedDepots.values
end
remove(depot) click to toggle source
# File lib/steam_codec/acf.rb, line 202
def remove(depot)
    @MountedDepots.delete(depot)
end
set(depot, manifest) click to toggle source
# File lib/steam_codec/acf.rb, line 198
def set(depot, manifest)
    @MountedDepots[depot] = manifest
end
to_hash() click to toggle source
# File lib/steam_codec/acf.rb, line 206
def to_hash
    @MountedDepots
end