Class: NBTFile::TopReaderState
- Inherits:
-
Object
- Object
- NBTFile::TopReaderState
- Includes:
- ReadMethods, Tokens
- Defined in:
- lib/nbtfile.rb
Instance Method Summary collapse
Methods included from ReadMethods
#read_byte, #read_byte_array, #read_double, #read_float, #read_int, #read_integer, #read_list_header, #read_long, #read_raw, #read_short, #read_string, #read_type, #read_value
Methods included from CommonMethods
Instance Method Details
#get_token(io) ⇒ Object
209 210 211 212 213 214 215 216 |
# File 'lib/nbtfile.rb', line 209 def get_token(io) type = read_type(io) raise RuntimeError, "expected TAG_Compound" unless type == TAG_Compound name = read_string(io) end_state = EndReaderState.new() next_state = CompoundReaderState.new(end_state) [next_state, type[name, nil]] end |