Class: NBTFile::TopWriterState

Inherits:
Object
  • Object
show all
Includes:
Tokens, WriteMethods
Defined in:
lib/nbtfile.rb

Instance Method Summary collapse

Methods included from WriteMethods

#emit_byte, #emit_byte_array, #emit_double, #emit_float, #emit_int, #emit_integer, #emit_list_header, #emit_long, #emit_short, #emit_string, #emit_type, #emit_value

Methods included from CommonMethods

#sign_bit

Instance Method Details

#emit_token(io, token) ⇒ Object



394
395
396
397
398
399
400
401
402
403
# File 'lib/nbtfile.rb', line 394

def emit_token(io, token)
  case token
  when TAG_Compound
    emit_type(io, token.class)
    emit_string(io, token.name)
    end_state = EndWriterState.new()
    next_state = CompoundWriterState.new(end_state, nil)
    next_state
  end
end