Sha256: 62d75e70ec7ce8e0d0fec68513faeeaaee93c6d3887b4e215e96cc3f4e55c815

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

module Fonte
  module Parsers
    grammar Player
      include Number
      include Word
      include SteamID

      rule player
        nickname "<" uid ">" "<" steam_id ">" "<" team ">"
      end

      rule nickname
        (![<>] .)* {
          def value
            text_value
          end
        }
      end

      rule uid
        integer
      end

      rule team
        (![<>] .)* {
          def value
            text_value == "Unassigned" || text_value == "Console" || text_value == "" ? nil : text_value
          end
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fonte-0.0.1 lib/fonte/parsers/player.treetop