def to_s(data = {})
      return @_cache unless undefined_size? || !@_cache
      return "x" * (tags[:size] || 1) if name == :null

      out = case tags[:type]
      when :short
        modify_if_needed "S"
      when :int
        modify_if_needed "I"
      when :long
        modify_if_needed "L"
      when :string
        handle_string_type
      when :float
        handle_float_type
      when nil
        handle_empty_type
      else
        nil
      end

      if tags[:size].is_a? Symbol
        out << data.fetch(tags[:size]).to_s
      elsif tags[:size] && ![:null, nil].include?(tags[:type])
        out << tags[:size].to_s
      end

      out
    end
def to_s(data = {})
      return @_cache unless undefined_size? || !@_cache
      return "x" * (tags[:size] || 1) if name == :null

      out = case tags[:type]
      when :short
        modify_if_needed "S"
      when :int
        modify_if_needed "I"
      when :long
        modify_if_needed "L"
      when :string
        handle_string_type
      when :float
        handle_float_type
      when nil
        handle_empty_type
      else
        nil
      end

      if tags[:size].is_a? Symbol
        out << data.fetch(tags[:size]).to_s
      elsif tags[:size] && ![:null, nil].include?(tags[:type])
        out << tags[:size].to_s
      end

      out
    end
Turn the directive into a string, with the given data.  It
 shouldn't need the data unless +tags[:size]+ is a Symbol.

 @param data [Hash<Symbol, Object>] the data that may be used for
   the length.
 @return [String]