Sha256: 5a8fe6fdcddc695334eaf5068650add286b7b7d726fb265e93e6fd853500fa2e
Contents?: true
Size: 471 Bytes
Versions: 1
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module NBTUtils class TagName < ::BinData::Record # Spec says this is a TAG_Short, which is signed. Staying strict # though this may really be unsigned in practice. int16be :len, value: proc { data.length } string :data, read_length: :len # things break for some reason if you just call the string :value def value data end def value=(other_value) self.data = (other_value) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nbt_utils-0.5.0 | lib/nbt_utils/tag_name.rb |