Class: SteamCodec::VDF

Inherits:
KeyValues
  • Object
show all
Defined in:
lib/steam_codec/vdf.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from KeyValues

#asArray, #get, loadFromJSON, #method_missing, #respond_to_missing?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SteamCodec::KeyValues

Class Method Details

.load(data) ⇒ Object



11
12
13
14
15
# File 'lib/steam_codec/vdf.rb', line 11

def self.load(data)
    vdf = KeyValues::load(data)
    return self[vdf] if vdf
    nil
end

.loadFromFile(file) ⇒ Object



5
6
7
8
9
# File 'lib/steam_codec/vdf.rb', line 5

def self.loadFromFile(file)
    vdf = KeyValues::loadFromFile(file)
    return self[vdf] if vdf
    nil
end

Instance Method Details

#isSignaturesValid?(publicKey) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
# File 'lib/steam_codec/vdf.rb', line 17

def isSignaturesValid?(publicKey)
    return true unless key?("kvsignatures")
    self["kvsignatures"].each do |key, signature|
        # TODO
        return false
    end
    true
end