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

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



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

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

.loadFromFile(file) ⇒ Object



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

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

Instance Method Details

#isSignaturesValid?(publicKey) ⇒ Boolean



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

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