class SteamCodec::ACF::SharedDepots

Attributes

Depots[R]

Public Class Methods

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

Public Instance Methods

depots() click to toggle source
# File lib/steam_codec/acf.rb, line 229
def depots
    @SharedDepots.keys
end
get(path = '', seperator = '.') click to toggle source
# File lib/steam_codec/acf.rb, line 225
def get(path = '', seperator = '.')
    @SharedDepots[path.to_i]
end
getDepot(depotID) click to toggle source
# File lib/steam_codec/acf.rb, line 233
def getDepot(depotID)
    @SharedDepots.each do |depot, baseDepot|
        return baseDepot if depot == depotID
    end
    nil
end
load(sharedDepots) click to toggle source
# File lib/steam_codec/acf.rb, line 217
def load(sharedDepots)
    raise ArgumentError, "SharedDepots must be instance of Hash" unless sharedDepots.is_a?(Hash)
    @SharedDepots = {}
    sharedDepots.each do |depot, baseDepot|
        @SharedDepots[depot.to_i] = baseDepot.to_i
    end
end
remove(depot) click to toggle source
# File lib/steam_codec/acf.rb, line 244
def remove(depot)
    @SharedDepots.delete(depot)
end
set(depot, baseDepot) click to toggle source
# File lib/steam_codec/acf.rb, line 240
def set(depot, baseDepot)
    @SharedDepots[depot] = baseDepot
end
to_hash() click to toggle source
# File lib/steam_codec/acf.rb, line 248
def to_hash
    @SharedDepots
end