Sha256: 8771acad35fbbb2592b1e6613e82f3c77a18e92f4bb975571571e0000029dd9e

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

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

      rule player
        nickname "<" uid ">" "<" steam_id ">" "<" team ">" {
          def value
            text_value
          end
        }
      end

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

      rule uid
        integer
      end

      rule team
        (![<>] character)* {
          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.1.0 lib/fonte/parsers/player.treetop