class Openra::Replays::Replay
Attributes
file[R]
Public Class Methods
new(filename)
click to toggle source
# File lib/openra/replays/replay.rb, line 8 def initialize(filename) @file = Openra::Replays::File.new(filename) end
Public Instance Methods
each_order(&block)
click to toggle source
# File lib/openra/replays/replay.rb, line 22 def each_order(&block) file.each_order(&block) end
file_hash()
click to toggle source
# File lib/openra/replays/replay.rb, line 12 def file_hash file.generate_hash end
metadata()
click to toggle source
# File lib/openra/replays/replay.rb, line 16 def metadata @metadata ||= Openra::Struct::Metadata.new( Openra::MiniYAML.load(file.metadata.data) ) end
player(index)
click to toggle source
# File lib/openra/replays/replay.rb, line 30 def player(index) players.find do |candidate| candidate.client_index == index end end
players()
click to toggle source
# File lib/openra/replays/replay.rb, line 26 def players metadata.players end