Module: Australium

Defined in:
lib/australium.rb,
lib/australium/game.rb,
lib/australium/event.rb,
lib/australium/parser.rb,
lib/australium/player.rb,
lib/australium/version.rb,
lib/australium/game_state.rb,
lib/australium/events/trigger.rb,
lib/australium/events/map_load.rb,
lib/australium/events/map_start.rb,
lib/australium/events/player_say.rb,
lib/australium/events/player_kill.rb,
lib/australium/events/player_connect.rb,
lib/australium/events/player_suicide.rb,
lib/australium/events/player_join_team.rb,
lib/australium/events/player_disconnect.rb,
lib/australium/events/player_enter_game.rb,
lib/australium/events/player_name_change.rb,
lib/australium/events/player_role_change.rb,
lib/australium/ref/open_struct_deep_clone.rb

Defined Under Namespace

Modules: OpenStructDeepClone Classes: Event, Game, GameState, MapLoad, MapStart, Parser, Player, PlayerConnect, PlayerDisconnect, PlayerEnterGame, PlayerJoinTeam, PlayerKill, PlayerNameChange, PlayerRoleChange, PlayerSay, PlayerSuicide, Trigger

Constant Summary collapse

VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.parse_file(logfile) ⇒ Array<Game> Also known as: parse

Parses a file located at the given path and returns an array of Games.

Parameters:

  • logfile (String)

    the location of the logfile.

Returns:

  • (Array<Game>)

    the parsed game data.



18
19
20
21
# File 'lib/australium.rb', line 18

def self.parse_file(logfile)
  log = File.read(logfile)
  Parser::parse(log.force_encoding('iso-8859-1').split("\n"))
end